Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Save bytes

  • Loading branch information...
commit 8372913ab5331eea700d78c6737f53b3dd7b4d7d 1 parent 955e6b4
@vrana authored
View
2  adminer/include/adminer.inc.php
@@ -433,7 +433,7 @@ function messageQuery($query) {
if (strlen($query) > 1e6) { // not DB - reset in drop database
$query = ereg_replace('[\x80-\xFF]+$', '', substr($query, 0, 1e6)) . "\n..."; // [\x80-\xFF] - valid UTF-8, \n - can end by one-line comment
}
- $history[$_GET["db"]][] = $query; //! respect $_GET["ns"]
+ $history[$_GET["db"]][] = $query; // not DB - $_GET["db"] is changed in database.inc.php //! respect $_GET["ns"]
return " <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('SQL command') . "</a><div id='$id' class='hidden'><pre><code class='jush-$jush'>" . shorten_utf8($query, 1000) . '</code></pre><p><a href="' . h(str_replace("db=" . urlencode(DB), "db=" . urlencode($_GET["db"]), ME) . 'sql=&history=' . (count($history[$_GET["db"]]) - 1)) . '">' . lang('Edit') . '</a></div>';
}
View
2  adminer/privileges.inc.php
@@ -1,7 +1,7 @@
<?php
page_header(lang('Privileges'));
-$result = $connection->query("SELECT User, Host FROM mysql." . ($_GET["db"] == "" ? "user" : "db WHERE " . q($_GET["db"]) . " LIKE Db") . " ORDER BY Host, User");
+$result = $connection->query("SELECT User, Host FROM mysql." . (DB == "" ? "user" : "db WHERE " . q($_GET["db"]) . " LIKE Db") . " ORDER BY Host, User");
if (!$result) {
?>
<form action=""><p>
View
2  adminer/user.inc.php
@@ -111,7 +111,7 @@
if ($old_pass != "") {
$row["hashed"] = true;
}
- $grants[$_GET["db"] != "" && $_GET["user"] == "" ? idf_escape($_GET["db"]) . ".*" : ""] = array();
+ $grants[DB != "" && !isset($_GET["host"]) ? idf_escape($_GET["db"]) . ".*" : ""] = array();
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.