Clear history (thanks to paranoiq)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@850 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
4a014a6d69
commit
5a0d809cb9
|
@ -229,4 +229,5 @@ $translations = array(
|
||||||
'Lists' => 'Seznamy',
|
'Lists' => 'Seznamy',
|
||||||
'Relations' => 'Vztahy',
|
'Relations' => 'Vztahy',
|
||||||
'Maximum allowed file size is %sB.' => 'Maximální povolená velikost souboru je %sB.',
|
'Maximum allowed file size is %sB.' => 'Maximální povolená velikost souboru je %sB.',
|
||||||
|
'Clear' => 'Vyčistit',
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
page_header(lang('SQL command'), $error);
|
|
||||||
$history = &$_SESSION["history"][$_GET["server"]][$_GET["db"]];
|
$history = &$_SESSION["history"][$_GET["server"]][$_GET["db"]];
|
||||||
|
if (!$error && $_POST["clear"]) {
|
||||||
|
$history = array();
|
||||||
|
redirect(remove_from_uri("history"));
|
||||||
|
}
|
||||||
|
|
||||||
|
page_header(lang('SQL command'), $error);
|
||||||
|
|
||||||
if (!$error && $_POST) {
|
if (!$error && $_POST) {
|
||||||
$query = (isset($_POST["file"]) ? get_file("sql_file") : $_POST["query"]);
|
$query = (isset($_POST["file"]) ? get_file("sql_file") : $_POST["query"]);
|
||||||
|
@ -93,6 +98,7 @@ if ($history) {
|
||||||
//! save and display timestamp
|
//! save and display timestamp
|
||||||
echo '<a href="' . htmlspecialchars($SELF . "sql=&history=$key") . '">' . lang('Edit') . '</a> <code class="jush-sql">' . shorten_utf8(str_replace("\n", " ", $val), 80, "</code>") . "<br>\n";
|
echo '<a href="' . htmlspecialchars($SELF . "sql=&history=$key") . '">' . lang('Edit') . '</a> <code class="jush-sql">' . shorten_utf8(str_replace("\n", " ", $val), 80, "</code>") . "<br>\n";
|
||||||
}
|
}
|
||||||
|
echo "<input type='submit' name='clear' value='" . lang('Clear') . "'>\n";
|
||||||
echo "</fieldset>\n";
|
echo "</fieldset>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue