1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 02:23:59 +02:00

Notices: Add helper for reset() with expression

This commit is contained in:
Jakub Vrana
2025-03-23 21:38:36 +01:00
parent 0501846743
commit f5ecb18896
5 changed files with 13 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ if (!$error && $_POST) {
if ($query != "" && strlen($query) < 1e6) { // don't add big queries
$q = $query . (preg_match("~;[ \t\r\n]*\$~", $query) ? "" : ";"); //! doesn't work with DELIMITER |
if (!$history || reset(end($history)) != $q) { // no repeated queries
if (!$history || first(end($history)) != $q) { // no repeated queries
restart_session();
$history[] = array($q, time()); //! add elapsed time
set_session("queries", $history_all); // required because reference is unlinked by stop_session()