diff --git a/libraries/classes/Server/Privileges.php b/libraries/classes/Server/Privileges.php index 6f69b30c4f..8d05da2fc8 100644 --- a/libraries/classes/Server/Privileges.php +++ b/libraries/classes/Server/Privileges.php @@ -729,7 +729,6 @@ class Privileges // global or db-specific $html_output .= $this->getHtmlForGlobalOrDbSpecificPrivs($db, $table, $row); } - $html_output .= '' . "\n"; if ($submit) { $html_output .= '
' . "\n"; - - return $html_output; } /** @@ -1097,7 +1060,7 @@ class Privileges */ public function getHtmlForGlobalOrDbSpecificPrivs($db, $table, array $row) { - $privTable_names = [ + $privTableNames = [ 0 => __('Data'), 1 => __('Structure'), 2 => __('Administration'), @@ -1107,49 +1070,43 @@ class Privileges $privTable[1] = $this->getStructurePrivilegeTable($table, $row); $privTable[2] = $this->getAdministrationPrivilegeTable($db); - $html_output = ''; + $grantCount = count($privTable[0]) + count($privTable[1]) + count($privTable[2]) - ( + isset($row['Grant_priv']) ? 1 : 0); + if ($db == '*') { $legend = __('Global privileges'); - $menu_label = __('Global'); + $menuLabel = __('Global'); } elseif ($table == '*') { $legend = __('Database-specific privileges'); - $menu_label = __('Database'); + $menuLabel = __('Database'); } else { $legend = __('Table-specific privileges'); - $menu_label = __('Table'); + $menuLabel = __('Table'); } - $html_output .= '