Save history in adminer_message_query
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@840 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
02b719b2d6
commit
04a3f5b30a
|
@ -73,7 +73,8 @@ function adminer_select_val($val, $link) {
|
||||||
function adminer_message_query($query) {
|
function adminer_message_query($query) {
|
||||||
global $SELF;
|
global $SELF;
|
||||||
$id = "sql-" . count($_SESSION["messages"]);
|
$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
|
/** Prints navigation after Adminer title
|
||||||
|
|
|
@ -107,7 +107,6 @@ function query_redirect($query, $location, $message, $redirect = true, $execute
|
||||||
$sql = "";
|
$sql = "";
|
||||||
if ($query) {
|
if ($query) {
|
||||||
$sql = adminer_message_query($query);
|
$sql = adminer_message_query($query);
|
||||||
$_SESSION["history"][$_GET["server"]][$_GET["db"]][] = $query;
|
|
||||||
}
|
}
|
||||||
if ($execute) {
|
if ($execute) {
|
||||||
$failed = !$dbh->query($query);
|
$failed = !$dbh->query($query);
|
||||||
|
|
Loading…
Reference in a new issue