bug #3072492 Error for wrong SQL disappears
This commit is contained in:
@@ -184,6 +184,9 @@ $(document).ready(function() {
|
|||||||
*/
|
*/
|
||||||
$("#sqlqueryform").live('submit', function(event) {
|
$("#sqlqueryform").live('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
// remove any div containing a previous error message
|
||||||
|
$('.error').remove();
|
||||||
|
|
||||||
$form = $(this);
|
$form = $(this);
|
||||||
PMA_ajaxShowMessage();
|
PMA_ajaxShowMessage();
|
||||||
|
|
||||||
@@ -206,7 +209,8 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (data.success == false ) {
|
else if (data.success == false ) {
|
||||||
PMA_ajaxShowMessage(data.error, 50000);
|
// show an error message that stays on screen
|
||||||
|
$('#sqlqueryform').before(data.error);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#sqlqueryresults").html(data);
|
$("#sqlqueryresults").html(data);
|
||||||
|
2
sql.php
2
sql.php
@@ -377,7 +377,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
|
|||||||
$table = '';
|
$table = '';
|
||||||
}
|
}
|
||||||
$active_page = $goto;
|
$active_page = $goto;
|
||||||
$message = htmlspecialchars(PMA_Message::rawError($error));
|
$message = PMA_Message::rawError(htmlspecialchars($error));
|
||||||
|
|
||||||
if( $GLOBALS['is_ajax_request'] == true) {
|
if( $GLOBALS['is_ajax_request'] == true) {
|
||||||
PMA_ajaxResponse($message, false);
|
PMA_ajaxResponse($message, false);
|
||||||
|
Reference in New Issue
Block a user