Shortcut for database privileges

This commit is contained in:
Jakub Vrana 2011-06-03 13:50:20 +02:00
parent 98e410f42d
commit 16a72b4521
4 changed files with 4 additions and 2 deletions

View file

@ -721,6 +721,7 @@ DROP PROCEDURE adminer_alter;
echo '<p>' . ($_GET["ns"] == "" ? '<a href="' . h(ME) . 'database=">' . lang('Alter database') . "</a>\n" : ""); echo '<p>' . ($_GET["ns"] == "" ? '<a href="' . h(ME) . 'database=">' . lang('Alter database') . "</a>\n" : "");
echo (support("scheme") ? "<a href='" . h(ME) . "scheme='>" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "</a>\n" : ""); echo (support("scheme") ? "<a href='" . h(ME) . "scheme='>" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "</a>\n" : "");
echo '<a href="' . h(ME) . 'schema=">' . lang('Database schema') . "</a>\n"; echo '<a href="' . h(ME) . 'schema=">' . lang('Database schema') . "</a>\n";
echo (support("privileges") ? "<a href='" . h(ME) . "privileges='>" . lang('Privileges') . "</a>\n" : "");
return true; return true;
} }

View file

@ -1,7 +1,7 @@
<?php <?php
page_header(lang('Privileges')); page_header(lang('Privileges'));
$result = $connection->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) { if (!$result) {
?> ?>
<form action=""><p> <form action=""><p>

View file

@ -111,7 +111,7 @@ if ($_POST) {
if ($old_pass != "") { if ($old_pass != "") {
$row["hashed"] = true; $row["hashed"] = true;
} }
$grants[""] = true; $grants[$_GET["db"] != "" ? idf_escape($_GET["db"]) . ".*" : ""] = true;
} }
?> ?>

View file

@ -1,6 +1,7 @@
Adminer 3.3.0-dev: Adminer 3.3.0-dev:
Use Esc to disable in-place edit Use Esc to disable in-place edit
Highlight SQL code in textarea Highlight SQL code in textarea
Shortcut for database privileges
Append new index with auto index selection (bug #3282127) Append new index with auto index selection (bug #3282127)
Bit type default value Bit type default value
Display foreign key name in tooltip Display foreign key name in tooltip