Execute_priv support

This commit is contained in:
Marc Delisle
2005-10-03 18:23:26 +00:00
parent e1d7360229
commit 2ec555a558
2 changed files with 19 additions and 4 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2005-10-03 Marc Delisle <lem9@users.sourceforge.net>
* server_privileges.php: support for Execute_priv
2005-10-01 Michal Čihař <michal@cihar.com> 2005-10-01 Michal Čihař <michal@cihar.com>
* lang/czech: Update. * lang/czech: Update.

View File

@@ -66,7 +66,6 @@ function PMA_extractPrivInfo($row = '', $enableHTML = FALSE)
array('Super_priv', 'SUPER', $GLOBALS['strPrivDescSuper']), array('Super_priv', 'SUPER', $GLOBALS['strPrivDescSuper']),
array('Create_tmp_table_priv', 'CREATE TEMPORARY TABLES', $GLOBALS['strPrivDescCreateTmpTable']), array('Create_tmp_table_priv', 'CREATE TEMPORARY TABLES', $GLOBALS['strPrivDescCreateTmpTable']),
array('Lock_tables_priv', 'LOCK TABLES', $GLOBALS['strPrivDescLockTables']), array('Lock_tables_priv', 'LOCK TABLES', $GLOBALS['strPrivDescLockTables']),
array('Execute_priv', 'EXECUTE', $GLOBALS['strPrivDescExecute']),
array('Repl_slave_priv', 'REPLICATION SLAVE', $GLOBALS['strPrivDescReplSlave']), array('Repl_slave_priv', 'REPLICATION SLAVE', $GLOBALS['strPrivDescReplSlave']),
array('Repl_client_priv', 'REPLICATION CLIENT', $GLOBALS['strPrivDescReplClient']), array('Repl_client_priv', 'REPLICATION CLIENT', $GLOBALS['strPrivDescReplClient']),
array('Create_view_priv', 'CREATE VIEW', $GLOBALS['strPrivDescCreateView']), array('Create_view_priv', 'CREATE VIEW', $GLOBALS['strPrivDescCreateView']),
@@ -79,6 +78,12 @@ function PMA_extractPrivInfo($row = '', $enableHTML = FALSE)
array('Alter_routine_priv', 'ALTER ROUTINE', $GLOBALS['strPrivDescAlterRoutine']), array('Alter_routine_priv', 'ALTER ROUTINE', $GLOBALS['strPrivDescAlterRoutine']),
array('Create_user_priv', 'CREATE USER', $GLOBALS['strPrivDescCreateUser']) array('Create_user_priv', 'CREATE USER', $GLOBALS['strPrivDescCreateUser'])
); );
if (PMA_MYSQL_INT_VERSION >= 40002 && PMA_MYSQL_INT_VERSION <50003) {
$grants[] = array('Execute_priv', 'EXECUTE', $GLOBALS['strPrivDescExecute']);
} else {
$grants[] = array('Execute_priv', 'EXECUTE', $GLOBALS['strPrivDescExecute5']);
}
if (!empty($row) && isset($row['Table_priv'])) { if (!empty($row) && isset($row['Table_priv'])) {
$res = PMA_DBI_query('SHOW COLUMNS FROM `mysql`.`tables_priv` LIKE \'Table_priv\';', $GLOBALS['userlink']); $res = PMA_DBI_query('SHOW COLUMNS FROM `mysql`.`tables_priv` LIKE \'Table_priv\';', $GLOBALS['userlink']);
$row1 = PMA_DBI_fetch_assoc($res); $row1 = PMA_DBI_fetch_assoc($res);
@@ -350,6 +355,13 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE, $indent =
if (isset($row['Alter_routine_priv'])) { if (isset($row['Alter_routine_priv'])) {
$privTable[1][] = array('Alter_routine', 'ALTER ROUTINE', $GLOBALS['strPrivDescAlterRoutine']); $privTable[1][] = array('Alter_routine', 'ALTER ROUTINE', $GLOBALS['strPrivDescAlterRoutine']);
} }
if (isset($row['Execute_priv'])) {
if (PMA_MYSQL_INT_VERSION >= 40002 && PMA_MYSQL_INT_VERSION <50003) {
$privTable[1][] = array('Execute', 'EXECUTE', $GLOBALS['strPrivDescExecute']);
} else {
$privTable[1][] = array('Execute', 'EXECUTE', $GLOBALS['strPrivDescExecute5']);
}
}
// a d m i n i s t r a t i o n // a d m i n i s t r a t i o n
$privTable[2] = array(); $privTable[2] = array();
@@ -374,9 +386,9 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE, $indent =
} }
$privTable[2][] = array('References', 'REFERENCES', $GLOBALS['strPrivDescReferences']); $privTable[2][] = array('References', 'REFERENCES', $GLOBALS['strPrivDescReferences']);
if ($db == '*') { if ($db == '*') {
if (isset($row['Execute_priv'])) { //if (isset($row['Execute_priv'])) {
$privTable[2][] = array('Execute', 'EXECUTE', $GLOBALS['strPrivDescExecute']); // $privTable[2][] = array('Execute', 'EXECUTE', $GLOBALS['strPrivDescExecute']);
} //}
if (isset($row['Repl_client_priv'])) { if (isset($row['Repl_client_priv'])) {
$privTable[2][] = array('Repl_client', 'REPLICATION CLIENT', $GLOBALS['strPrivDescReplClient']); $privTable[2][] = array('Repl_client', 'REPLICATION CLIENT', $GLOBALS['strPrivDescReplClient']);
} }