mirror of
https://github.com/vrana/adminer.git
synced 2025-08-18 20:31:19 +02:00
Minimize the chance of displaying message on different page (thanks to Tomas Brukner)
This commit is contained in:
@@ -404,8 +404,9 @@ username.form['driver'].onchange();
|
||||
*/
|
||||
function messageQuery($query) {
|
||||
global $jush;
|
||||
static $count = 0;
|
||||
restart_session();
|
||||
$id = "sql-" . count($_SESSION["messages"]);
|
||||
$id = "sql-" . ($count++);
|
||||
$history = &get_session("queries");
|
||||
$history[$_GET["db"]][] = (strlen($query) > 1e6 // not DB - reset in drop database
|
||||
? ereg_replace('[\x80-\xFF]+$', '', substr($query, 0, 1e6)) . "\n..." // [\x80-\xFF] - valid UTF-8, \n - can end by one-line comment
|
||||
|
Reference in New Issue
Block a user