From 5d147c25affd72bba06b86d131c272bceb361f4d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 10 Apr 2011 09:01:31 -0400 Subject: [PATCH] Bug #3281316 Loading message stays on screen for too long --- js/sql.js | 16 +++++++++------- sql.php | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/js/sql.js b/js/sql.js index 6895b16c56..1444b1595a 100644 --- a/js/sql.js +++ b/js/sql.js @@ -264,13 +264,15 @@ $(document).ready(function() { $('.success').fadeOut(); $('.sqlquery_message').fadeOut(); // show a message that stays on screen - $('#sqlqueryform').before(data.message); - // and display the query - $('
') - .html(data.sql_query) - .insertBefore('#sqlqueryform'); - // unnecessary div that came from data.sql_query - $('.notice').remove(); + if (typeof data.sql_query != 'undefined') { + $('
') + .html(data.sql_query) + .insertBefore('#sqlqueryform'); + // unnecessary div that came from data.sql_query + $('.notice').remove(); + } else { + $('#sqlqueryform').before(data.message); + } $('#sqlqueryresults').show(); // this happens if a USE command was typed if (typeof data.reload != 'undefined') { diff --git a/sql.php b/sql.php index eb6dc52697..ce2f65fbdc 100644 --- a/sql.php +++ b/sql.php @@ -710,7 +710,7 @@ if (0 == $num_rows || $is_affected) { } if ($cfg['ShowSQL']) { - $extra_data['result_query'] = PMA_showMessage($message, $GLOBALS['sql_query'], 'success'); + $extra_data['sql_query'] = PMA_showMessage($message, $GLOBALS['sql_query'], 'success'); } if (isset($GLOBALS['reload']) && $GLOBALS['reload'] == 1) { $extra_data['reload'] = 1; -- 2.11.4.GIT