bug #3417089 [synchronize] Extraneous db choices
This commit is contained in:
@@ -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
|
||||
|
@@ -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>';
|
||||
|
Reference in New Issue
Block a user