From 6d33a475ebe737860639a8276890b1b06be9bd3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 17 Feb 2016 11:37:02 +0100 Subject: [PATCH] Fixed rendering of messages without SQL query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It should get rounded boxes at bottom, but didn't get it. Signed-off-by: Michal Čihař --- libraries/Util.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libraries/Util.php b/libraries/Util.php index d8e53d316d..527662c667 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -1099,14 +1099,18 @@ class Util } } + $render_sql = $cfg['ShowSQL'] == true && ! empty($sql_query) && $sql_query !== ';'; + if (isset($GLOBALS['using_bookmark_message'])) { $retval .= $GLOBALS['using_bookmark_message']->getDisplay(); unset($GLOBALS['using_bookmark_message']); } - $retval .= '
' . "\n"; + if ($render_sql) { + $retval .= '
' . "\n"; + } if ($message instanceof Message) { if (isset($GLOBALS['special_message'])) { @@ -1124,7 +1128,7 @@ class Util $retval .= '
'; } - if ($cfg['ShowSQL'] == true && ! empty($sql_query) && $sql_query !== ';') { + if ($render_sql) { // Html format the query to be displayed // If we want to show some sql code it is easiest to create it here /* SQL-Parser-Analyzer */ @@ -1345,9 +1349,10 @@ class Util $retval .= $inline_edit_link . $edit_link . $explain_link . $php_link . $refresh_link; $retval .= '
'; + + $retval .= ''; } - $retval .= ''; return $retval; } // end of the 'getMessage()' function