From fd25405391286ecc9798f7e5cc143da33fb4a300 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 14 Feb 2004 00:24:57 +0000 Subject: [PATCH] fixed my previous fix... (I was just too tired ;-) ) --- libraries/common.lib.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 3783882ade..f697321d66 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -356,7 +356,7 @@ if ($is_minimum_common == FALSE) { // Check that we actually have a valid set of parsed data // well, not quite // first check for the SQL parser having hit an error - if (!defined('PMA_SQP_isError') || PMA_SQP_isError()) { + if (PMA_SQP_isError()) { return $parsed_sql; } // then check for an array @@ -467,10 +467,10 @@ if ($is_minimum_common == FALSE) { // --- Added to solve bug #641765 // Robbat2 - 12 January 2003, 9:46PM // Revised, Robbat2 - 13 Janurary 2003, 2:59PM - if (!defined('PMA_SQP_isError') || PMA_SQP_isError()) { - $parsed_sql = htmlspecialchars($the_query); + if (!function_exists('PMA_SQP_isError') || PMA_SQP_isError()) { + $formatted_sql = htmlspecialchars($the_query); } else { - $parsed_sql = PMA_SQP_parse($the_query); + $formatted_sql = PMA_formatSql(PMA_SQP_parse($the_query), $the_query); } // --- @@ -482,7 +482,7 @@ if ($is_minimum_common == FALSE) { // --- Added to solve bug #641765 // Robbat2 - 12 January 2003, 9:46PM // Revised, Robbat2 - 13 Janurary 2003, 2:59PM - if (defined('PMA_SQP_isError') && PMA_SQP_isError()) { + if (function_exists('PMA_SQP_isError') && PMA_SQP_isError()) { echo PMA_SQP_getErrorString(); } // --- @@ -495,7 +495,7 @@ if ($is_minimum_common == FALSE) { } // end if echo '

' . "\n" . '

' . "\n" - . ' ' . PMA_formatSql($parsed_sql, $the_query) . "\n" + . ' ' . $formatted_sql . "\n" . '

' . "\n"; } // end if if (!empty($error_message)) {