diff --git a/adminer/user.inc.php b/adminer/user.inc.php index 4909769b..d6a5bc97 100644 --- a/adminer/user.inc.php +++ b/adminer/user.inc.php @@ -113,7 +113,7 @@ if ($_POST) { if ($old_pass != "") { $row["hashed"] = true; } - $grants[DB != "" && !isset($_GET["host"]) ? idf_escape(addcslashes(DB, "%_")) . ".*" : ""] = array(); + $grants[(DB != "" && !isset($_GET["host"]) ? idf_escape(addcslashes(DB, "%_")) : "") . ".*"] = array(); } ?> @@ -150,7 +150,7 @@ foreach (array( foreach ($grants as $object => $grant) { $name = "'grants[$i][" . h(strtoupper($privilege)) . "]'"; $value = $grant[strtoupper($privilege)]; - if ($context == "Server Admin" && $object != (isset($grants["*.*"]) ? "*.*" : "")) { + if ($context == "Server Admin" && $object != (isset($grants["*.*"]) ? "*.*" : ".*")) { echo " "; } elseif (isset($_GET["grant"])) { echo "";