diff --git a/libraries/Util.php b/libraries/Util.php index 1199f1adce..00382cc6f3 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -1092,18 +1092,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']); } - // In an Ajax request, $GLOBALS['cell_align_left'] may not be defined. Hence, - // check for it's presence before using it - $retval .= '
' . "\n"; + if ($render_sql) { + $retval .= '
' . "\n"; + } if ($message instanceof Message) { if (isset($GLOBALS['special_message'])) { @@ -1121,7 +1121,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 */ @@ -1342,9 +1342,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