Option to stop on error (thanks to Vaclav Marik)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@558 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2009-02-24 10:48:59 +00:00
parent f3679d7e7b
commit 2e03c63537
2 changed files with 5 additions and 0 deletions

View file

@ -213,4 +213,5 @@ $translations = array(
'Import' => 'Import',
'Table structure' => 'Struktura tabulky',
'Select table' => 'Vypsat tabulku',
'Stop on error' => 'Zastavit při chybě',
);

View file

@ -29,6 +29,9 @@ if (!$error && $_POST) {
//! don't allow changing of character_set_results, convert encoding of displayed query
if (!$mysql->multi_query(substr($query, 0, $match[0][1]))) {
echo "<p class='error'>" . lang('Error in query') . ": " . htmlspecialchars($mysql->error) . "</p>\n";
if ($_POST["error_stops"]) {
break;
}
} else {
do {
$result = $mysql->store_result();
@ -64,6 +67,7 @@ if (!$error && $_POST) {
<script type="text/javascript">// <![CDATA[
document.write('<label><input type="checkbox" name="highlight" value="jush"<?php echo ($_COOKIE["highlight"] == "jush" ? ' checked="checked"' : ''); ?> /><?php echo addcslashes(lang('Syntax highlighting'), "\r\n'\\"); ?></label>');
// ]]></script>
<label><input type="checkbox" name="error_stops" value="1"<?php echo ($_POST["error_stops"] ? " checked='checked'" : ""); ?> /><?php echo lang('Stop on error'); ?></label>
</p>
</form>