bug #1721571 CREATE database privilege not always detected

This commit is contained in:
Marc Delisle
2007-05-19 18:08:38 +00:00
parent d16da0e73c
commit 646d6c0875
2 changed files with 7 additions and 1 deletions

View File

@@ -15,6 +15,8 @@ $HeadURL$
thanks to Michael Keck thanks to Michael Keck
- bug #1717477 Warning on Query page when db is empty - bug #1717477 Warning on Query page when db is empty
- bug #1721002 db rename -> undefined cfgRelation, thanks to Juergen Wind - bug #1721002 db rename -> undefined cfgRelation, thanks to Juergen Wind
- bug #1721571 CREATE database privilege not always detected,
thanks to Gordon McNaughton
2.10.1.0 (2007-04-23) 2.10.1.0 (2007-04-23)
===================== =====================

View File

@@ -28,7 +28,11 @@ function PMA_analyseShowGrant($rs_usr, &$is_create_db_priv, &$db_to_create, &$is
if ($show_grants_str == 'RELOAD') { if ($show_grants_str == 'RELOAD') {
$is_reload_priv = true; $is_reload_priv = true;
} }
if (($show_grants_str == 'ALL') || ($show_grants_str == 'ALL PRIVILEGES') || ($show_grants_str == 'CREATE') || strpos($show_grants_str, 'CREATE')) { /**
* @todo if we find CREATE VIEW but not CREATE, do not offer
* the create database dialog box
*/
if (($show_grants_str == 'ALL') || ($show_grants_str == 'ALL PRIVILEGES') || ($show_grants_str == 'CREATE') || strpos($show_grants_str, 'CREATE,') !== false) {
if ($show_grants_dbname == '*') { if ($show_grants_dbname == '*') {
// a global CREATE privilege // a global CREATE privilege
$is_create_db_priv = true; $is_create_db_priv = true;