fixed bug #487673 - revoke 'reference'

This commit is contained in:
Loïc Chapeaux
2001-12-01 08:50:37 +00:00
parent 6e70f5203b
commit 2f8001d316
2 changed files with 12 additions and 4 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2001-12-01 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* user_details.php3, lines 83-88: fixed bug #487673 - revoke 'reference'.
2001-11-30 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/display_tbl.lib.php3: fixed bug #486509 - Text fields don't
display newlines.

View File

@@ -80,15 +80,20 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
$i = 0;
while ($usr_row = mysql_fetch_row($result)) {
if (eregi('GRANT (.*) ON ([^\.]+).([^\.]+) TO .*$', $usr_row[0], $parts)) {
$priv = ($parts[1] != 'USAGE') ? trim($parts[1]) : '';
// loic1: bug #487673 - revoke 'reference'
if ($parts[1] == 'USAGE') {
$priv = '';
} else {
$priv = ereg_replace('REFERENCE([^S]|$)', 'REFERENCES', trim($parts[1]));
}
$db = $parts[2];
$table = trim($parts[3]);
$grantopt = eregi('WITH GRANT OPTION$', $usr_row[0]);
} else {
$priv = '';
$db = '&nbsp';
$table = '&nbsp';
$column = '&nbsp';
$db = '&nbsp;';
$table = '&nbsp;';
$column = '&nbsp;';
$grantopt = FALSE;
} // end if...else