mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 08:34:20 +02:00
Fix SQL query history
This commit is contained in:
@@ -35,7 +35,10 @@ if (!$error && $_POST) {
|
|||||||
if ($query != "" && strlen($query) < 1e6) { // don't add big queries
|
if ($query != "" && strlen($query) < 1e6) { // don't add big queries
|
||||||
$q = $query . (ereg(";[ \t\r\n]*\$", $query) ? "" : ";"); //! doesn't work with DELIMITER |
|
$q = $query . (ereg(";[ \t\r\n]*\$", $query) ? "" : ";"); //! doesn't work with DELIMITER |
|
||||||
if (!$history || reset(end($history)) != $q) { // no repeated queries
|
if (!$history || reset(end($history)) != $q) { // no repeated queries
|
||||||
|
restart_session();
|
||||||
$history[] = array($q, time());
|
$history[] = array($q, time());
|
||||||
|
set_session("queries", $history_all); // required because reference is unlinked by stop_session()
|
||||||
|
stop_session();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$space = "(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\n)";
|
$space = "(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\n)";
|
||||||
|
Reference in New Issue
Block a user