diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index c533d4ec..69d3df42 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -721,6 +721,7 @@ DROP PROCEDURE adminer_alter; echo '

' . ($_GET["ns"] == "" ? '' . lang('Alter database') . "\n" : ""); echo (support("scheme") ? "" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "\n" : ""); echo '' . lang('Database schema') . "\n"; + echo (support("privileges") ? "" . lang('Privileges') . "\n" : ""); return true; } diff --git a/adminer/privileges.inc.php b/adminer/privileges.inc.php index 7bbf3616..12cef6a9 100644 --- a/adminer/privileges.inc.php +++ b/adminer/privileges.inc.php @@ -1,7 +1,7 @@ query("SELECT User, Host FROM mysql.user ORDER BY Host, User"); +$result = $connection->query("SELECT User, Host FROM mysql." . ($_GET["db"] == "" ? "user" : "db WHERE " . q($_GET["db"]) . " LIKE Db") . " ORDER BY Host, User"); if (!$result) { ?>

diff --git a/adminer/user.inc.php b/adminer/user.inc.php index f52396ef..38a3b505 100644 --- a/adminer/user.inc.php +++ b/adminer/user.inc.php @@ -111,7 +111,7 @@ if ($_POST) { if ($old_pass != "") { $row["hashed"] = true; } - $grants[""] = true; + $grants[$_GET["db"] != "" ? idf_escape($_GET["db"]) . ".*" : ""] = true; } ?> diff --git a/changes.txt b/changes.txt index ba71092f..a0dfd62c 100644 --- a/changes.txt +++ b/changes.txt @@ -1,6 +1,7 @@ Adminer 3.3.0-dev: Use Esc to disable in-place edit Highlight SQL code in textarea +Shortcut for database privileges Append new index with auto index selection (bug #3282127) Bit type default value Display foreign key name in tooltip