Fixed two minor parser bugs.
This commit is contained in:
@@ -9,6 +9,10 @@ $Source$
|
|||||||
2002-10-30 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-10-30 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* libraries/common.lib.php3: Better display of the query if parser is
|
* libraries/common.lib.php3: Better display of the query if parser is
|
||||||
disabled.
|
disabled.
|
||||||
|
* libraries/sqlparser.lib.php3:
|
||||||
|
- ANSI Comments were not recognized if the two '-' characters were
|
||||||
|
followed up by a line feed character instead of a space one;
|
||||||
|
- Fixed the misinterpretation of Windows / Mac line feeds.
|
||||||
|
|
||||||
2002-10-28 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-10-28 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* lang/dutch.inc.php3: Fixed a bug in the Dutch language files
|
* lang/dutch.inc.php3: Fixed a bug in the Dutch language files
|
||||||
|
@@ -171,6 +171,10 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
|||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// rabus: Convert all line feeds to Unix style
|
||||||
|
$sql = str_replace("\r\n", "\n", $sql);
|
||||||
|
$sql = str_replace("\r", "\n", $sql);
|
||||||
|
|
||||||
$len = $GLOBALS['PMA_strlen']($sql);
|
$len = $GLOBALS['PMA_strlen']($sql);
|
||||||
if ($len == 0) {
|
if ($len == 0) {
|
||||||
return array();
|
return array();
|
||||||
@@ -227,7 +231,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
|||||||
// ANSI style --
|
// ANSI style --
|
||||||
if (($c == '#')
|
if (($c == '#')
|
||||||
|| (($count2 + 1 < $len) && ($c == '/') && ($sql[$count2 + 1] == '*'))
|
|| (($count2 + 1 < $len) && ($c == '/') && ($sql[$count2 + 1] == '*'))
|
||||||
|| (($count2 + 2 < $len) && ($c == '-') && ($sql[$count2 + 1] == '-') && ($sql[$count2 + 2] == ' '))) {
|
|| (($count2 + 2 < $len) && ($c == '-') && ($sql[$count2 + 1] == '-') && ereg("(\n|[space])", $sql[$count2 + 2]))) {
|
||||||
$count2++;
|
$count2++;
|
||||||
$pos = 0;
|
$pos = 0;
|
||||||
$type = 'bad';
|
$type = 'bad';
|
||||||
|
Reference in New Issue
Block a user