From bd50de3e0022545936483a380ab834a85a061060 Mon Sep 17 00:00:00 2001
From: Robin Johnson
Date: Fri, 26 Jul 2002 00:01:02 +0000
Subject: [PATCH] libraries/sqlparser.lib.php3: - Fixed analyze code to remove
print_r()
---
ChangeLog | 1 +
libraries/sqlparser.lib.php3 | 11 ++++-------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ca5fd482a..97025e09c 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@ $Source$
- Fix code to work around CSS bug in Mozilla/Konqueror with 'inherit'
value.
- Fix strpos on line 168/169 to work with PHP3
+ - Fixed analyze code to remove print_r()
2002-07-25 Marc Delisle
* Documentation.html, clarify about mysql extensions
diff --git a/libraries/sqlparser.lib.php3 b/libraries/sqlparser.lib.php3
index 6ae2dc9a4..c83cfa633 100644
--- a/libraries/sqlparser.lib.php3
+++ b/libraries/sqlparser.lib.php3
@@ -381,9 +381,8 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$encodedstr = nl2br(chunk_split(base64_encode(gzcompress($debugstr, 9))));
echo $encodedstr . "\n";
echo '---END CUT---
' . "\n\n";
- //$decodedstr = str_replace('
', '', base64_decode(gzuncompress($encodedstr)));
- $decodedstr = gzuncompress(base64_decode(str_replace('
', '', $encodedstr)));
- echo $decodedstr . "\n";
+ //$decodedstr = /*gzuncompress(*/base64_decode(str_replace('
', '', $encodedstr))/*)*/;
+ //echo $decodedstr . "\n";
echo '
' . "\n";
flush();
ob_flush();
@@ -470,7 +469,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
);
$supported_query_types_cnt = count($supported_query_types);
- for ($i = 0; $i <= $size; $i++) {
+ for ($i = 0; $i < $size; $i++) {
// High speed seek for locating the end of the current query
if ($seek_queryend == TRUE) {
if ($arr[$i]['type'] == 'punct_queryend') {
@@ -514,9 +513,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$result[] = $subresult;
}
- echo '';
- print_r($result);
- echo '
';
+ return $result;
} // end of the "PMA_SQP_analyze()" function