Fix bug #3930 Databases to choose for specific privileges show up escaped

This commit is contained in:
J.M 2013-05-14 16:04:49 +02:00
parent 159927a742
commit e2ea214267
2 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@ values
- bug #3898 Structure not refreshed after column drop
- bug #3926 View is not updatable
- bug #3919 PropertiesIconic not honored
- bug #3930 Databases to choose for specific privileges show up escaped
4.0.1.0 (not yet released)
- bug #3879 Import broken for CSV using LOAD DATA

View File

@ -2273,14 +2273,15 @@ function PMA_getHTmlForDisplaySelectDbInEditPrivs($found_rows)
. '<option value="" selected="selected">'
. __('Use text field') . ':</option>' . "\n";
foreach ($pred_db_array as $current_db) {
$current_db_show = $current_db;
$current_db = PMA_Util::escapeMysqlWildcards($current_db);
// cannot use array_diff() once, outside of the loop,
// because the list of databases has special characters
// already escaped in $found_rows,
// contrary to the output of SHOW DATABASES
if (empty($found_rows) || ! in_array($current_db, $found_rows)) {
if (empty($found_rows) || ! in_array($current_db_show, $found_rows)) {
$html_output .= '<option value="' . htmlspecialchars($current_db) . '">'
. htmlspecialchars($current_db) . '</option>' . "\n";
. htmlspecialchars($current_db_show) . '</option>' . "\n";
}
}
$html_output .= '</select>' . "\n";