[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_7RC1-9436-g98a5ba7

Marc Delisle lem9 at users.sourceforge.net
Sat Sep 4 13:01:42 CEST 2010


The branch, master has been updated
       via  98a5ba73172c30d10dc80b8b46c9a17cde849249 (commit)
      from  49ae8993fe9ef163d53d443fa65951f43553dce4 (commit)


- Log -----------------------------------------------------------------
commit 98a5ba73172c30d10dc80b8b46c9a17cde849249
Author: Marc Delisle <marc at infomarc.info>
Date:   Sat Sep 4 07:01:30 2010 -0400

    misleading variable name

-----------------------------------------------------------------------

Summary of changes:
 db_operations.php                |    2 +-
 db_qbe.php                       |    2 +-
 db_structure.php                 |    4 ++--
 libraries/Index.class.php        |    4 ++--
 libraries/display_tbl.lib.php    |    4 ++--
 libraries/sql_query_form.lib.php |    2 +-
 sql.php                          |   10 +++++-----
 tbl_operations.php               |    8 ++++----
 tbl_structure.php                |   18 +++++++++---------
 9 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/db_operations.php b/db_operations.php
index 535ee31..c17d372 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -406,7 +406,7 @@ echo __('Remove database');
             'goto' => 'main.php',
             'reload' => '1',
             'purge' => '1',
-            'zero_rows' => sprintf(__('Database %s has been dropped.'), htmlspecialchars(PMA_backquote($db))),
+            'message_to_show' => sprintf(__('Database %s has been dropped.'), htmlspecialchars(PMA_backquote($db))),
             'db' => NULL,
         );
     ?>
diff --git a/db_qbe.php b/db_qbe.php
index 2475065..a8aeb42 100644
--- a/db_qbe.php
+++ b/db_qbe.php
@@ -22,7 +22,7 @@ $cfgRelation = PMA_getRelationsParam();
  */
 if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) {
     $goto      = 'db_sql.php';
-    $zero_rows = htmlspecialchars(__('Your SQL query has been executed successfully'));
+    $message_to_show = htmlspecialchars(__('Your SQL query has been executed successfully'));
     require './sql.php';
     exit;
 } else {
diff --git a/db_structure.php b/db_structure.php
index dafdcdc..f166547 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -298,7 +298,7 @@ foreach ($tables as $keyname => $each_table) {
             $empty_table = '<a class="truncate_table_anchor" href="sql.php?' . $tbl_url_query
                  . '&sql_query=';
             $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
-                 . '&zero_rows='
+                 . '&message_to_show='
                  . urlencode(sprintf(__('Table %s has been emptied'), htmlspecialchars($each_table['TABLE_NAME'])))
                  .'">' . $titles['Empty'] . '</a>';
         } else {
@@ -386,7 +386,7 @@ foreach ($tables as $keyname => $each_table) {
     <td align="center">
         <a class="drop_table_anchor" href="sql.php?<?php echo $tbl_url_query;
             ?>&reload=1&purge=1&sql_query=<?php
-            echo urlencode($drop_query); ?>&zero_rows=<?php
+            echo urlencode($drop_query); ?>&message_to_show=<?php
             echo urlencode($drop_message); ?>" >
             <?php echo $titles['Drop']; ?></a></td>
     <?php } // end if (! $db_is_information_schema)
diff --git a/libraries/Index.class.php b/libraries/Index.class.php
index 81ef590..285f578 100644
--- a/libraries/Index.class.php
+++ b/libraries/Index.class.php
@@ -468,11 +468,11 @@ class PMA_Index
                 $this_params = $GLOBALS['url_params'];
                 if ($index->getName() == 'PRIMARY') {
                     $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY';
-                    $this_params['zero_rows'] = __('The primary key has been dropped');
+                    $this_params['message_to_show'] = __('The primary key has been dropped');
                     $js_msg      = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP PRIMARY KEY');
                 } else {
                     $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP INDEX ' . PMA_backquote($index->getName());
-                    $this_params['zero_rows'] = sprintf(__('Index %s has been dropped'), $index->getName());
+                    $this_params['message_to_show'] = sprintf(__('Index %s has been dropped'), $index->getName());
                     $js_msg      = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP INDEX ' . $index->getName());
                 }
 
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index bb16bbf..a57c909 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -1143,7 +1143,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
                     'db'        => $db,
                     'table'     => $table,
                     'sql_query' => $url_sql_query,
-                    'zero_rows' => __('The row has been deleted'),
+                    'message_to_show' => __('The row has been deleted'),
                     'goto'      => (empty($goto) ? 'tbl_sql.php' : $goto),
                 );
                 $lnk_goto = 'sql.php' . PMA_generate_common_url($_url_params, 'text');
@@ -1155,7 +1155,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
                     'db'        => $db,
                     'table'     => $table,
                     'sql_query' => $del_query,
-                    'zero_rows' => __('The row has been deleted'),
+                    'message_to_show' => __('The row has been deleted'),
                     'goto'      => $lnk_goto,
                 );
                 $del_url  = 'sql.php' . PMA_generate_common_url($_url_params);
diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php
index 8ac7c1c..7dfe8c5 100644
--- a/libraries/sql_query_form.lib.php
+++ b/libraries/sql_query_form.lib.php
@@ -132,7 +132,7 @@ function PMA_sqlQueryForm($query = true, $display_tab = false, $delimiter = ';')
         .'<input type="hidden" name="pos" value="0" />' . "\n"
         .'<input type="hidden" name="goto" value="'
         .htmlspecialchars($goto) . '" />' . "\n"
-        .'<input type="hidden" name="zero_rows" value="'
+        .'<input type="hidden" name="message_to_show" value="'
         . htmlspecialchars(__('Your SQL query has been executed successfully')) . '" />' . "\n"
         .'<input type="hidden" name="prev_sql_query" value="'
         . htmlspecialchars($query) . '" />' . "\n";
diff --git a/sql.php b/sql.php
index 1a2853f..8277374 100644
--- a/sql.php
+++ b/sql.php
@@ -242,7 +242,7 @@ if ($do_confirm) {
         .PMA_generate_common_hidden_inputs($db, $table);
     ?>
     <input type="hidden" name="sql_query" value="<?php echo htmlspecialchars($sql_query); ?>" />
-    <input type="hidden" name="zero_rows" value="<?php echo isset($zero_rows) ? PMA_sanitize($zero_rows, true) : ''; ?>" />
+    <input type="hidden" name="message_to_show" value="<?php echo isset($message_to_show) ? PMA_sanitize($message_to_show, true) : ''; ?>" />
     <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
     <input type="hidden" name="back" value="<?php echo isset($back) ? PMA_sanitize($back, true) : ''; ?>" />
     <input type="hidden" name="reload" value="<?php echo isset($reload) ? PMA_sanitize($reload, true) : 0; ?>" />
@@ -577,11 +577,11 @@ if (0 == $num_rows || $is_affected) {
         // The form generated by sql_query_form.lib.php
         // and db_sql.php has many submit buttons
         // on the same form, and some confusion arises from the
-        // fact that $zero_rows is sent for every case.
-        // The $zero_rows containing a success message and sent with
+        // fact that $message_to_show is sent for every case.
+        // The $message_to_show containing a success message and sent with
         // the form should not have priority over errors
-    } elseif (!empty($zero_rows) && !$is_select) {
-        $message = PMA_Message::rawSuccess(htmlspecialchars($zero_rows));
+    } elseif (!empty($message_to_show) && !$is_select) {
+        $message = PMA_Message::rawSuccess(htmlspecialchars($message_to_show));
     } elseif (!empty($GLOBALS['show_as_php'])) {
         $message = PMA_Message::success(__('Showing as PHP code'));
     } elseif (isset($GLOBALS['show_as_php'])) {
diff --git a/tbl_operations.php b/tbl_operations.php
index 666f6f3..d5fd6db 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -202,7 +202,7 @@ unset($reread_info);
  */
 require_once './libraries/tbl_links.inc.php';
 
-if (isset($result) && empty($zero_rows)) {
+if (isset($result) && empty($message_to_show)) {
     // set to success by default, because result set could be empty
     // (for example, a table rename)
     $_type = 'success';
@@ -624,7 +624,7 @@ if ($is_myisam_or_maria || $is_innodb || $is_berkeleydb) {
 $this_url_params = array_merge($url_params,
     array(
         'sql_query' => 'FLUSH TABLE ' . PMA_backquote($GLOBALS['table']),
-        'zero_rows' => sprintf(__('Table %s has been flushed'),
+        'message_to_show' => sprintf(__('Table %s has been flushed'),
             htmlspecialchars($GLOBALS['table'])),
         'reload'    => 1,
         ));
@@ -650,7 +650,7 @@ if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_
             'sql_query' => $this_sql_query,
             'goto' => 'tbl_structure.php',
             'reload' => '1',
-            'zero_rows' => sprintf(__('Table %s has been emptied'), htmlspecialchars($table)),
+            'message_to_show' => sprintf(__('Table %s has been emptied'), htmlspecialchars($table)),
         ));
     ?>
     <li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" onclick="return confirmLink(this, '<?php echo PMA_jsFormat($this_sql_query); ?>')">
@@ -667,7 +667,7 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
             'goto' => 'db_operations.php',
             'reload' => '1',
             'purge' => '1',
-            'zero_rows' => sprintf(($tbl_is_view ? __('View %s has been dropped') : __('Table %s has been dropped')), htmlspecialchars($table)),
+            'message_to_show' => sprintf(($tbl_is_view ? __('View %s has been dropped') : __('Table %s has been dropped')), htmlspecialchars($table)),
             // table name is needed to avoid running 
             // PMA_relationsCleanupDatabase() on the whole db later
             'table' => $GLOBALS['table'],
diff --git a/tbl_structure.php b/tbl_structure.php
index 812ff50..7c59d98 100644
--- a/tbl_structure.php
+++ b/tbl_structure.php
@@ -393,7 +393,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
             <?php echo $titles['Change']; ?></a>
     </td>
     <td align="center" class="drop">
-        <a class="drop_column_anchor" href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&dropped_column=<?php echo urlencode($row['Field']); ?>&zero_rows=<?php echo urlencode(sprintf(__('Column %s has been dropped'), htmlspecialchars($row['Field']))); ?>" >
+        <a class="drop_column_anchor" href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&dropped_column=<?php echo urlencode($row['Field']); ?>&message_to_show=<?php echo urlencode(sprintf(__('Column %s has been dropped'), htmlspecialchars($row['Field']))); ?>" >
             <?php echo $titles['Drop']; ?></a>
     </td>
     <td align="center" class="primary">
@@ -404,7 +404,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
         } else {
             echo "\n";
             ?>
-        <a class="add_primary_key_anchor" href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ($primary ? ' DROP PRIMARY KEY,' : '') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('A primary key has been added on %s'), htmlspecialchars($row['Field']))); ?>" >
+        <a class="add_primary_key_anchor" href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ($primary ? ' DROP PRIMARY KEY,' : '') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('A primary key has been added on %s'), htmlspecialchars($row['Field']))); ?>" >
             <?php echo $titles['Primary']; ?></a>
             <?php $primary_enabled = true;
         }
@@ -419,7 +419,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
         } else {
             echo "\n";
             ?>
-        <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
+        <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
             <?php echo $titles['Unique']; ?></a>
             <?php $unique_enabled = true;
         }
@@ -434,7 +434,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
         } else {
             echo "\n";
             ?>
-        <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
+        <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
             <?php echo $titles['Index']; ?></a>
             <?php
             $index_enabled = true;
@@ -449,7 +449,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
             echo "\n";
             ?>
     <td align="center" nowrap="nowrap" class="fulltext">
-        <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
+        <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
             <?php echo $titles['IdxFulltext']; ?></a>
             <?php $fulltext_enabled = true; ?>
     </td>
@@ -479,7 +479,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
                 <?php
                 if(isset($primary_enabled)) {
                      if($primary_enabled) { ?>
-                          <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ($primary ? ' DROP PRIMARY KEY,' : '') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('A primary key has been added on %s'), htmlspecialchars($row['Field']))); ?>">
+                          <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ($primary ? ' DROP PRIMARY KEY,' : '') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('A primary key has been added on %s'), htmlspecialchars($row['Field']))); ?>">
                              <?php echo $hidden_titles['Primary']; ?>
                          </a>
                      <?php
@@ -492,7 +492,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
                 <?php
                 if(isset($unique_enabled)) {
                      if($unique_enabled) { ?>
-                         <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
+                         <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
                              <?php echo $hidden_titles['Unique']; ?>
                          </a>
                      <?php
@@ -505,7 +505,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
                <?php
                 if(isset($index_enabled)) {
                      if($index_enabled) { ?>
-                         <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
+                         <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
                              <?php echo $hidden_titles['Index']; ?>
                          </a>
                      <?php
@@ -518,7 +518,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
                 <?php
                 if(isset($fulltext_enabled)) {
                      if($fulltext_enabled) { ?>
-                         <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
+                         <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
                              <?php echo $hidden_titles['IdxFulltext']; ?>
                          </a>
                      <?php


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list