On "Privileges" page clicking "Edit privileges" icon (root or somebody else), then in fieldset "Database-specific privileges" from the dropdown menu selecting information\_schema (or other DB with underscore in it's name), now at the top of the page we see this big sentence "User 'root'@'localhost' - Database information\_schema : Edit Privileges".
"information\_schema" here is a link to nowhere becase that's how it looks inside:
<a href="db_details_structure.php?token=c6a31871e57ad469ffdc3a8c8a0d8ded&db=information%5C_schema&reload=1">information\_schema</a>
information%5C_schema - is not correct.
phpMyAdmin_2.9.1.1-slash_bug
Logged In: YES
user_id=1686741
Originator: YES
Sorry, second attempt. :)
On "Privileges" page clicking "Edit privileges" icon (root or somebody else), then in fieldset "Database-specific privileges" from the dropdown menu selecting information\_schema (or other DB with underscore in it's name), now at the top of the page we see this big sentence "User 'root'@'localhost' - Database information\_schema : Edit Privileges".
"information\_schema" here is a link to nowhere becase that's how it looks inside:
<a href="db_details_structure.php?token=c6a31871e57ad469ffdc3a8c8a0d8ded&db=information%5C_schema&reload=1">information\_schema</a>
information%5C_schema - is not correct.
server_privileges.php line 1581:
echo ' <i><a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $GLOBALS['url_query'] . '&db=' . urlencode($dbname) . '&reload=1">' . htmlspecialchars($dbname) . '</a></i>' . "\n";
Cnanged to:
echo ' <i><a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $GLOBALS['url_query'] . '&db=' . urlencode(str_replace('\_', '_', $dbname)) . '&reload=1">' . htmlspecialchars($dbname) . '</a></i>' . "\n";
Now it works.
The same problem we see further, when trying to select "Table-specific privileges" dropdown menu: "User 'root'@'localhost' - Database information\_schema - Table CHARACTER_SETS : Edit Privileges"
"CHARACTER_SETS" link looks like:
http://localhost/phpmyadmin/tbl_properties_structure.php?token=c6a31871e57ad469ffdc3a8c8a0d8ded&db=information%5C_schema&table=CHARACTER_SETS&reload=1
information%5C_schema - incorrect.
Line 1583:
echo ' - ' . $GLOBALS['strTable'] . ' <i><a href="' . $GLOBALS['cfg']['DefaultTabTable'] . '?' . $GLOBALS['url_query'] . '&db=' . urlencode($dbname) . '&table=' . urlencode($tablename) . '&reload=1">' . htmlspecialchars($tablename) . '</a></i>' . "\n";
Changed to:
echo ' - ' . $GLOBALS['strTable'] . ' <i><a href="' . $GLOBALS['cfg']['DefaultTabTable'] . '?' . $GLOBALS['url_query'] . '&db=' . urlencode(str_raplace('\_', '_', $dbname) . '&table=' . urlencode($tablename) . '&reload=1">' . htmlspecialchars($tablename) . '</a></i>' . "\n";
It works fine either.
Good, but twice calling functions urlencode() and str_replace() is not very good so I think it's better to create new variable... say $url_dbname. And now lines 1581-1584:
echo ' <i><a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $GLOBALS['url_query'] . '&db=' . urlencode(str_replace('\_', '_', $dbname)) . '&reload=1">' . htmlspecialchars($dbname) . '</a></i>' . "\n";
if ( isset( $tablename ) && strlen($tablename) ) {
echo ' - ' . $GLOBALS['strTable'] . ' <i><a href="' . $GLOBALS['cfg']['DefaultTabTable'] . '?' . $GLOBALS['url_query'] . '&db=' . urlencode(str_replace('\_', '_', $dbname)) . '&table=' . urlencode($tablename) . '&reload=1">' . htmlspecialchars($tablename) . '</a></i>' . "\n";
}
Ghanged to:
$url_dbname = urlencode(str_replace('\_', '_', $dbname));
echo ' <i><a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $GLOBALS['url_query'] . '&db=' . $url_dbname . '&reload=1">' . htmlspecialchars($dbname) . '</a></i>' . "\n";
if ( isset( $tablename ) && strlen($tablename) ) {
echo ' - ' . $GLOBALS['strTable'] . ' <i><a href="' . $GLOBALS['cfg']['DefaultTabTable'] . '?' . $GLOBALS['url_query'] . '&db=' . $url_dbname . '&table=' . urlencode($tablename) . '&reload=1">' . htmlspecialchars($tablename) . '</a></i>' . "\n";
}
Hope it's valuable.
Logged In: YES
user_id=210714
Originator: NO
Merged in 2.10, thanks.