Now format_sql also finds missing brackets

This commit is contained in:
Mike Beck
2002-06-12 13:06:44 +00:00
parent e6d8750e3c
commit 5e9f703bc7
47 changed files with 80 additions and 5 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-06-12 Mike Beck <mikebeck@users.sourceforge.net>
Syntaxcoloring for SQL - Statements
* config.inc.php3 lines 226-,302-
* libraries/common.lib.php3 lines 34,43,192-,312-,987,1062
2002-06-12 Marc Delisle <lem9@users.sourceforge.net>
* lang/dutch.inc.php3 updates, thanks to Ivo Teel

View File

@@ -398,4 +398,5 @@ $strZip = '"kompresuar me zip"';
// To translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -399,4 +399,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -397,4 +397,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -398,4 +398,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -398,4 +398,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -393,4 +393,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -400,4 +400,5 @@ $strCreatePage = 'Create a new Page';
$strSelectTables = 'Select Tables';
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -400,4 +400,5 @@ $strCreatePage = 'Create a new Page';
$strSelectTables = 'Select Tables';
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -398,4 +398,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -398,4 +398,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -398,4 +398,5 @@ $strZip = '"zazipov
// To translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -398,4 +398,5 @@ $strZip = '"zazipov
// To translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -392,4 +392,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -394,4 +394,6 @@ $strYes = 'Ja';
$strZip = '"Gezipt"';
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -392,4 +392,5 @@ $strYes = 'Yes';
$strZip = '"zipped"';
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -393,4 +393,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -397,4 +397,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -392,4 +392,5 @@ $strYes = 'Oui';
$strZip = '"zipp<70>"';
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -397,4 +397,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -402,4 +402,5 @@ $strPrimaryKeyHasBeenDropped = 'The primary key has been dropped';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -401,4 +401,5 @@ $strYes = 'Ja';
$strZip = 'Zip komprimiert';
// To translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -394,4 +394,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -393,4 +393,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -396,4 +396,5 @@ $strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -395,4 +395,5 @@ $strZip = '"Dikompress dengan Zip"';
// To translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -399,4 +399,5 @@ $strYes = ' Si ';
$strZip = '"compresso con zip"';
// To translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -403,4 +403,5 @@ $strXkana = '
// To translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -402,4 +402,5 @@ $strXkana = '
// To translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -394,4 +394,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -397,4 +397,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -394,4 +394,5 @@ $strZip = '"zip"';
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strReferentialIntegrity = 'Check referential integrity:';
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -396,4 +396,5 @@ $strZip = 'Komprimert (zip)';
// To translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -394,4 +394,5 @@ $strZip = '".zip"';
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -400,4 +400,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -394,4 +394,5 @@ $strZip = '"arhivat"';
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -398,4 +398,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -398,4 +398,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -399,4 +399,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -396,4 +396,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -396,4 +396,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -391,4 +391,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -393,4 +393,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -403,4 +403,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -393,4 +393,5 @@ $strCreatePage = 'Create a new Page'; //to translate
$strSelectTables = 'Select Tables'; //to translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -393,4 +393,5 @@ $strZip = '
// To translate
$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!<br />This might happen if php finds a parse error in it or php cannot find the file.<br />Please call the configuration file directly using the link below and read the php error message(s) that you recieve. In most cases a quote or a semicolon is missing somewhere.<br />If you recieve a blank page, everything is fine.'; //to translate
$strNotSet = '<b>%s</b> table not found or not set in %s'; //to translate
$strMissingBracket = 'Missing Bracket'; //to translate
?>

View File

@@ -221,7 +221,9 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
// now split everything by the blanks
$_sql_parts=explode(' ',$sql);
// start a loop over the parts check each word and put them back into $sql
$sql = '';
unset($sql);
$s_nr=0;
while (list($_num,$_word) = each($_sql_parts)) {
// we might have added to many blanks when checking for = and ,
// which might lead to empty members in the array
@@ -256,18 +258,41 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
} else {
if(eregi($_add, $_word)) {
$_word = '<font color="' . $cfg['colorAdd'].'">' . $_word . '</font>';
} else {
if($_word=='(') {
$_brack_o[]=$s_nr;
} else {
if($_word==')') {
if(isset($_brack_o)){
unset($_brack_o[count($_brack_o)-1]);
} else {
$_brack_c[]=$s_nr;
}
}
}
}
}
}
}
}
if(!isset($_temp) || strlen($_temp) == 0) {
if($_num != 0 && $_word != '(') {
$sql .= ' ';
}
$sql .= $_word;
$_sql_p[$s_nr] = $_word;
$s_nr++;
}
} // End while
if(isset($_brack_o)) {
while (list($_num,$elem) = each($_brack_o)) {
$_sql_p[$elem] = '<font color="red">' . $_sql_p[$elem] . '</font>';
echo '<br /><font color="red">' . $GLOBALS['strMissingBracket'] . '</font><br />';
}
}
if(isset($_brack_c)) {
while (list($_num,$elem) = each($_brack_c)) {
$_sql_p[$elem] = '<font color="red">' . $_sql_p[$elem] . '</font>';
echo '<br /><font color="red">' . $GLOBALS['strMissingBracket'] . '</font><br />';
}
}
$sql = implode(' ',$_sql_p);
return $sql;
} // End of PMA_format_sql function