Display SQL history from oldest

This commit is contained in:
Jakub Vrana 2013-04-16 09:50:32 -07:00
parent 285afc202a
commit e8e95e5fd7
2 changed files with 3 additions and 1 deletions

View file

@ -202,7 +202,8 @@ echo "</div></fieldset>\n";
if ($history) {
print_fieldset("history", lang('History'), $_GET["history"] != "");
foreach ($history as $key => $val) {
for ($val = end($history); $val; $val = prev($history)) { // not array_reverse() to save memory
$key = key($history);
list($q, $time) = $val;
echo '<a href="' . h(ME . "sql=&history=$key") . '">' . lang('Edit') . "</a> <span class='time' title='" . @date('Y-m-d', $time) . "'>" . @date("H:i:s", $time) . "</span> <code class='jush-$jush'>" . shorten_utf8(ltrim(str_replace("\n", " ", str_replace("\r", "", preg_replace('~^(#|-- ).*~m', '', $q)))), 80, "</code>") . "<br>\n"; // @ - time zone may be not set
}

View file

@ -2,6 +2,7 @@ Adminer 3.6.4-dev:
Display pagination on a fixed position
Increase default select limit to 50
Display SQL edit form on Ctrl+click on the select query
Display SQL history from oldest
Recover original view, trigger, routine if creating fails
Clear column name after resetting search (bug #3601200)
Explain partitions in SQL query (bug #3600150)