From d1e353f23539e12545ee77314df7ccdf4a7ec2e5 Mon Sep 17 00:00:00 2001 From: Pavel Rochnyack Date: Wed, 3 Aug 2016 11:11:02 +0100 Subject: [PATCH] Fix #12419 wrong description on GRANT option of table/routine privileges. Signed-off-by: Pavel Rochnyack --- libraries/server_privileges.lib.php | 33 +++++++++++++++++++---------- server_privileges.php | 5 +++-- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index 2a00fc9967..0fa8653cb4 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -1032,8 +1032,8 @@ function PMA_getTriggerPrivilegeTable() 'Grant', 'GRANT', __( - 'Allows adding users and privileges ' - . 'without reloading the privilege tables.' + 'Allows user to give to other users or remove from other users ' + . 'privileges that user possess on this routine.' ) ), array( @@ -1402,16 +1402,16 @@ function PMA_getStructurePrivilegeTable($table, $row) */ function PMA_getAdministrationPrivilegeTable($db) { - $adminPrivTable = array( - array('Grant', - 'GRANT', - __( - 'Allows adding users and privileges ' - . 'without reloading the privilege tables.' - ) - ), - ); if ($db == '*') { + $adminPrivTable = array( + array('Grant', + 'GRANT', + __( + 'Allows adding users and privileges ' + . 'without reloading the privilege tables.' + ) + ), + ); $adminPrivTable[] = array('Super', 'SUPER', __( @@ -1438,6 +1438,17 @@ function PMA_getAdministrationPrivilegeTable($db) __('Gives access to the complete list of databases.') ); } + else { + $adminPrivTable = array( + array('Grant', + 'GRANT', + __( + 'Allows user to give to other users or remove from other' + . ' users the privileges that user possess yourself.' + ) + ), + ); + } $adminPrivTable[] = array('Lock_tables', 'LOCK TABLES', __('Allows locking tables for the current thread.') diff --git a/server_privileges.php b/server_privileges.php index 34dd8933b8..c7b1c4f71e 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -68,8 +68,9 @@ $strPrivDescDropTbl = __('Allows dropping tables.'); $strPrivDescEvent = __('Allows to set up events for the event scheduler.'); $strPrivDescExecute = __('Allows executing stored routines.'); $strPrivDescFile = __('Allows importing data from and exporting data into files.'); -$strPrivDescGrant = __( - 'Allows adding users and privileges without reloading the privilege tables.' +$strPrivDescGrantTbl = __( + 'Allows user to give to other users or remove from other users the privileges ' + . 'that user possess yourself.' ); $strPrivDescIndex = __('Allows creating and dropping indexes.'); $strPrivDescInsert = __('Allows inserting and replacing data.');