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