Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prefill .* when creating a new user

  • Loading branch information...
commit 841cbbb7d2089456e60402e78fdd7770432af5ba 1 parent fd7e8cb
@vrana authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 adminer/user.inc.php
View
4 adminer/user.inc.php
@@ -113,7 +113,7 @@
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 ($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 "<td>&nbsp;";
} elseif (isset($_GET["grant"])) {
echo "<td><select name=$name><option><option value='1'" . ($value ? " selected" : "") . ">" . lang('Grant') . "<option value='0'" . ($value == "0" ? " selected" : "") . ">" . lang('Revoke') . "</select>";
Please sign in to comment.
Something went wrong with that request. Please try again.