Skip to content

Commit

Permalink
Save history in adminer_message_query
Browse files Browse the repository at this point in the history
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@840 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information
jakubvrana committed Jul 16, 2009
1 parent 02b719b commit 04a3f5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion adminer/include/adminer.inc.php
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion adminer/include/functions.inc.php
Expand Up @@ -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);
Expand Down

0 comments on commit 04a3f5b

Please sign in to comment.