Undefined variable (bug #1243885).

This commit is contained in:
Michal Čihař
2005-07-24 12:00:48 +00:00
parent 6d92b4963f
commit fcfc5ea0d2
2 changed files with 8 additions and 0 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-07-24 Michal Čihař <michal@cihar.com>
* libraries/check_user_privileges.lib.php: Undefined variable (bug
#1243885).
2005-07-23 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties_structure.php, tbl_properties.inc.php:
bug #1157230, escape special chars in ENUM or SET

View File

@@ -64,6 +64,10 @@ if (PMA_MYSQL_INT_VERSION >= 40102) {
// $userlink so maybe the SELECT will fail
if (!$is_create_priv) {
$res = PMA_DBI_query('SELECT USER();');
list($mysql_cur_user_and_host) = PMA_DBI_fetch_row($res);
$mysql_cur_user = substr($mysql_cur_user_and_host, 0, strrpos($mysql_cur_user_and_host, '@'));
$local_query = 'SELECT Create_priv, Reload_priv FROM mysql.user WHERE ' . PMA_convert_using('User') . ' = ' . PMA_convert_using(PMA_sqlAddslashes($mysql_cur_user), 'quoted') . ' OR ' . PMA_convert_using('User') . ' = ' . PMA_convert_using('', 'quoted') . ';';
$rs_usr = PMA_DBI_try_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE);
if ($rs_usr) {