diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index b94dba1128..2668a99524 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -1828,14 +1828,14 @@ function PMA_getHtmlForSpecificDbPrivileges($db) list($list_of_privileges, $list_of_compared_privileges) = PMA_getListOfPrivilegesAndComparedPrivileges(); - $sql_query = '(SELECT ' . $list_of_privileges . ', `Db`' + $sql_query = '(SELECT ' . $list_of_privileges . ', `Db`, \'d\' AS `Type`' .' FROM `mysql`.`db`' .' WHERE \'' . PMA_Util::sqlAddSlashes($db) . "'" .' LIKE `Db`' .' AND NOT (' . $list_of_compared_privileges. ')) ' .'UNION ' - .'(SELECT ' . $list_of_privileges . ', \'*\' AS `Db`' + .'(SELECT ' . $list_of_privileges . ', \'*\' AS `Db`, \'g\' AS `Type`' .' FROM `mysql`.`user` ' .' WHERE NOT (' . $list_of_compared_privileges . ')) ' .' ORDER BY `User` ASC,' @@ -1935,13 +1935,13 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table) list($list_of_privileges, $list_of_compared_privileges) = PMA_getListOfPrivilegesAndComparedPrivileges(); $sql_query = "(" - . " SELECT " . $list_of_privileges . ", '*' AS `Db`" + . " SELECT " . $list_of_privileges . ", '*' AS `Db`, 'g' AS `Type`" . " FROM `mysql`.`user`" . " WHERE NOT (" . $list_of_compared_privileges . ")" . ")" . " UNION " . "(" - . " SELECT " . $list_of_privileges . ", `Db`" + . " SELECT " . $list_of_privileges . ", `Db`, 'd' AS `Type`" . " FROM `mysql`.`db`" . " WHERE '" . PMA_Util::sqlAddSlashes($db) . "' LIKE `Db`" . " AND NOT (" . $list_of_compared_privileges. ")" @@ -1962,7 +1962,7 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table) $privMap[$user][$host][] = $row; } - $sql_query = "SELECT `User`, `Host`, `Db`, `Table_name`, `Table_priv`" + $sql_query = "SELECT `User`, `Host`, `Db`, 't' AS `Type`, `Table_name`, `Table_priv`" . " FROM `mysql`.`tables_priv`" . " WHERE '" . PMA_Util::sqlAddSlashes($db) . "' LIKE `Db`" . " AND '" . PMA_Util::sqlAddSlashes($table) . "' LIKE `Table_name`" @@ -1991,7 +1991,7 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table) // Offer to create a new user for the current database $html_output .= '
' - . '' . _pgettext('Create new user', 'New') . ''; + . '' . _pgettext('Create new user', 'New') . ''; $html_output .= '