[Phpmyadmin-git] [SCM] phpMyAdmin branch, QA_3_4, updated. RELEASE_3_4_5-36-ge27961b

Marc Delisle lem9 at users.sourceforge.net
Sun Oct 2 13:41:59 CEST 2011


The branch, QA_3_4 has been updated
       via  e27961b1b282677a541f42db17e615525caaf30d (commit)
      from  6c980106b7e49de3d94a2877ec4f23253d21ee0b (commit)


- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |    1 +
 server_synchronize.php |   27 +++++++++++++++++----------
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d5cee34..239796f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@ phpMyAdmin - ChangeLog
 - bug #3392150 [schema] PMA_User_Schema::processUserChoice() is broken
 - bug #3414744 [core] External link fails in 3.4.5
 - patch #3314626 [display] CharTextareaRows is not respected
+- bug #3417089 [synchronize] Extraneous db choices
 
 3.4.5.0 (2011-09-14)
 - bug #3375325 [interface] Page list in navigation frame looks odd
diff --git a/server_synchronize.php b/server_synchronize.php
index 9ff9cd4..b2cabce 100644
--- a/server_synchronize.php
+++ b/server_synchronize.php
@@ -1100,6 +1100,11 @@ if (isset($_REQUEST['synchronize_db'])) {
     $databases = PMA_DBI_get_databases_full(null, false, null, 'SCHEMA_NAME',
         'ASC', 0, true);
 
+    $databases_to_hide = array(
+        'information_schema',
+        'mysql'
+        );
+
     if ($GLOBALS['cfg']['AllowArbitraryServer'] === false) {
         $possibly_readonly = ' readonly="readonly"';
     } else {
@@ -1194,20 +1199,22 @@ if (isset($_REQUEST['synchronize_db'])) {
 	    <td><?php echo __('Database'); ?></td>
 	    <td>
 <?php
-      // these unset() do not complain if the elements do not exist
-    unset($databases['mysql']);
-    unset($databases['information_schema']);
+    $options_list = '';
+    foreach ($databases as $array_key => $db) {
+        if (in_array($db['SCHEMA_NAME'], $databases_to_hide)) {
+            unset($databases[$array_key]);
+        } else {
+            $options_list .= '<option>' . htmlspecialchars($db['SCHEMA_NAME']) . '</option>';
+        }
+    }
 
 	if (count($databases) == 0) {
 		echo __('No databases');
 	} else {
-		echo '
-	      	<select name="' . $type . '_db_sel">
-		';
-		foreach ($databases as $db) {
-            echo '		<option>' . htmlspecialchars($db['SCHEMA_NAME']) . '</option>';
-		}
-        echo '</select>';
+		echo '<select name="' . $type . '_db_sel">'
+         . $options_list
+         . '</select>';
+        unset($options_list);
 	}
 	echo '</td> </tr>
       </table>';


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list