Permalink
Browse files

Save history in adminer_message_query

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@840 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 02b719b commit 04a3f5b30a550b0e06036793342e1e0dd591516c jakubvrana committed Jul 16, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −1 adminer/include/adminer.inc.php
  2. +0 −1 adminer/include/functions.inc.php
@@ -73,7 +73,8 @@ function adminer_select_val($val, $link) {
function adminer_message_query($query) {
global $SELF;
$id = "sql-" . count($_SESSION["messages"]);
- return call_adminer('message_query', " <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('SQL command') . "</a><div id='$id' class='hidden'><pre class='jush-sql'>" . htmlspecialchars($query) . '</pre><a href="' . htmlspecialchars($SELF . 'sql=&history=' . count($_SESSION["history"][$_GET["server"]][$_GET["db"]])) . '">' . lang('Edit') . '</a></div>', $query);
+ $_SESSION["history"][$_GET["server"]][$_GET["db"]][] = $query;
+ return call_adminer('message_query', " <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('SQL command') . "</a><div id='$id' class='hidden'><pre class='jush-sql'>" . htmlspecialchars($query) . '</pre><a href="' . htmlspecialchars($SELF . 'sql=&history=' . (count($_SESSION["history"][$_GET["server"]][$_GET["db"]]) - 1)) . '">' . lang('Edit') . '</a></div>', $query);
}
/** Prints navigation after Adminer title
@@ -107,7 +107,6 @@ function query_redirect($query, $location, $message, $redirect = true, $execute
$sql = "";
if ($query) {
$sql = adminer_message_query($query);
- $_SESSION["history"][$_GET["server"]][$_GET["db"]][] = $query;
}
if ($execute) {
$failed = !$dbh->query($query);

0 comments on commit 04a3f5b

Please sign in to comment.