Fix Bug #735970 (query history only with correct queries)
This commit is contained in:
@@ -8,6 +8,8 @@ $Source$
|
||||
2003-05-12 Garvin Hicking <me@supergarv.de>
|
||||
* queryframe.php3: Remove left/bottom margin to better fit the link title
|
||||
in the small frame.
|
||||
* footer.inc.php3: Only update db/table variables if the query was correct.
|
||||
Fixes #735970.
|
||||
|
||||
2003-05-12 Michal Cihar <nijel@users.sourceforge.net>
|
||||
* index.php3: Better fix for #736003.
|
||||
|
@@ -32,6 +32,9 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
|
||||
<?php echo ($cfg['QueryFrameDebug'] ? 'document.writeln("<a href=\'#\' onClick=\'top.frames.queryframe.querywindow.focus(); return false;\'>Query Window</a> can be updated.<br>");' : ''); ?>
|
||||
|
||||
<?php
|
||||
if (!isset($error_message) || $error_message == '') {
|
||||
?>
|
||||
top.frames.queryframe.querywindow.document.querywindow.db.value = "<?php echo (isset($db) ? addslashes($db) : '') ?>";
|
||||
top.frames.queryframe.querywindow.document.querywindow.query_history_latest_db.value = "<?php echo (isset($db) ? addslashes($db) : '') ?>";
|
||||
top.frames.queryframe.querywindow.document.querywindow.table.value = "<?php echo (isset($table) ? addslashes($table) : '') ?>";
|
||||
@@ -40,7 +43,14 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
<?php echo (isset($sql_query) ? 'top.frames.queryframe.querywindow.document.querywindow.query_history_latest.value = "' . urlencode($sql_query) . '";' : '// no sql query update') . "\n"; ?>
|
||||
|
||||
<?php echo ($cfg['QueryFrameDebug'] ? 'alert(\'Querywindow submits. Last chance to check variables.\');' : '') . "\n"; ?>
|
||||
<?php echo ((!isset($error_message) || $error_message == '') ? 'top.frames.queryframe.querywindow.document.querywindow.submit();' : '// no submit, query was invalid') . "\n"; ?>
|
||||
top.frames.queryframe.querywindow.document.querywindow.submit();
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
// no submit, query was invalid
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user