Skip to content

Commit

Permalink
Fix SQL query history
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Sep 7, 2012
1 parent 8d3afc0 commit de45101
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adminer/sql.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
if ($query != "" && strlen($query) < 1e6) { // don't add big queries
$q = $query . (ereg(";[ \t\r\n]*\$", $query) ? "" : ";"); //! doesn't work with DELIMITER |
if (!$history || reset(end($history)) != $q) { // no repeated queries
restart_session();
$history[] = array($q, time());
set_session("queries", $history_all); // required because reference is unlinked by stop_session()
stop_session();
}
}
$space = "(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\n)";
Expand Down

0 comments on commit de45101

Please sign in to comment.