Fixed two minor parser bugs.
This commit is contained in:
@@ -171,6 +171,10 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
||||
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);
|
||||
if ($len == 0) {
|
||||
return array();
|
||||
@@ -227,7 +231,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
||||
// ANSI style --
|
||||
if (($c == '#')
|
||||
|| (($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++;
|
||||
$pos = 0;
|
||||
$type = 'bad';
|
||||
|
Reference in New Issue
Block a user