From a411cd0ca4a358bb104551bb1a2accc023fa19f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 17 Feb 2016 11:35:36 +0100 Subject: [PATCH 1/2] The cell_align_left is defined in common.inc.php so it should available in all cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/Util.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libraries/Util.php b/libraries/Util.php index f2124e800d..d8e53d316d 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -1104,12 +1104,8 @@ class Util 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 ($message instanceof Message) { 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 2/2] 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