From e27961b1b282677a541f42db17e615525caaf30d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 2 Oct 2011 07:25:45 -0400 Subject: [PATCH] bug #3417089 [synchronize] Extraneous db choices --- ChangeLog | 1 + server_synchronize.php | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5cee34b4..239796fb2 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 9ff9cd4e8..b2cabce20 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'])) { $db) { + if (in_array($db['SCHEMA_NAME'], $databases_to_hide)) { + unset($databases[$array_key]); + } else { + $options_list .= ''; + } + } if (count($databases) == 0) { echo __('No databases'); } else { - echo ' - '; + echo ''; + unset($options_list); } echo ' ';