From f3b5c67cbd7a564cea8781587a2f7793ed9ca25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 19 Oct 2004 12:49:21 +0000 Subject: [PATCH] Set correct return value (bug #1048861). --- ChangeLog | 1 + libraries/read_dump.lib.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5441f06a8..cc0328f41 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ $Source$ 2004-10-19 Michal Čihař * export.php: Use just \n for SQL exports (bug #1042521). + * libraries/read_dump.lib.php: Set correct return value (bug #1048861). 2004-10-17 Marc Delisle * lang/turkish update, thanks to boralioglu. diff --git a/libraries/read_dump.lib.php b/libraries/read_dump.lib.php index f8a97ea1f..e2d823a67 100644 --- a/libraries/read_dump.lib.php +++ b/libraries/read_dump.lib.php @@ -39,7 +39,7 @@ function PMA_splitSqlFile(&$ret, $sql, $release) // No end of string found -> add the current substring to the // returned array if (!$i) { - $ret[] = $sql; + $ret[] = array('query' => $sql, 'empty' => $nothing); return TRUE; } // Backquotes or no backslashes before quotes: it's indeed the @@ -72,7 +72,7 @@ function PMA_splitSqlFile(&$ret, $sql, $release) } // end if...elseif...else } // end for } // end if (in string) - + // lets skip comments (/*, -- and #) else if (($char == '-' && $sql_len > $i + 2 && $sql[$i + 1] == '-' && $sql[$i + 2] <= ' ') || $char == '#' || ($char == '/' && $sql_len > $i + 1 && $sql[$i + 1] == '*')) { $i = strpos($sql, $char == '/' ? '*/' : "\n", $i);