The branch, master has been updated via fe5577568d6d63f6b49bfb33f3b104baac37463a (commit) from 2845fbb451cca0485b2fa82d2a77b4ee1fcfba6e (commit)
- Log ----------------------------------------------------------------- commit fe5577568d6d63f6b49bfb33f3b104baac37463a Author: Marc Delisle marc@infomarc.info Date: Fri Oct 8 06:23:27 2010 -0400
bug #3072492 Error for wrong SQL disappears
-----------------------------------------------------------------------
Summary of changes: js/sql.js | 6 +++++- sql.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/js/sql.js b/js/sql.js index 8979251..d40cdd4 100644 --- a/js/sql.js +++ b/js/sql.js @@ -184,6 +184,9 @@ $(document).ready(function() { */ $("#sqlqueryform").live('submit', function(event) { event.preventDefault(); + // remove any div containing a previous error message + $('.error').remove(); + $form = $(this); PMA_ajaxShowMessage();
@@ -206,7 +209,8 @@ $(document).ready(function() { } } else if (data.success == false ) { - PMA_ajaxShowMessage(data.error, 50000); + // show an error message that stays on screen + $('#sqlqueryform').before(data.error); } else { $("#sqlqueryresults").html(data); diff --git a/sql.php b/sql.php index 898c893..f4b3ed4 100644 --- a/sql.php +++ b/sql.php @@ -377,7 +377,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { $table = ''; } $active_page = $goto; - $message = htmlspecialchars(PMA_Message::rawError($error)); + $message = PMA_Message::rawError(htmlspecialchars($error));
if( $GLOBALS['is_ajax_request'] == true) { PMA_ajaxResponse($message, false);
hooks/post-receive