Save bytes
This commit is contained in:
parent
955e6b44b3
commit
8372913ab5
|
@ -433,7 +433,7 @@ username.form['driver'].onchange();
|
||||||
if (strlen($query) > 1e6) { // not DB - reset in drop database
|
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
|
$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>';
|
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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
page_header(lang('Privileges'));
|
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) {
|
if (!$result) {
|
||||||
?>
|
?>
|
||||||
<form action=""><p>
|
<form action=""><p>
|
||||||
|
|
|
@ -111,7 +111,7 @@ if ($_POST) {
|
||||||
if ($old_pass != "") {
|
if ($old_pass != "") {
|
||||||
$row["hashed"] = true;
|
$row["hashed"] = true;
|
||||||
}
|
}
|
||||||
$grants[$_GET["db"] != "" && $_GET["user"] == "" ? idf_escape($_GET["db"]) . ".*" : ""] = array();
|
$grants[DB != "" && !isset($_GET["host"]) ? idf_escape($_GET["db"]) . ".*" : ""] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue