libraries/sqlvalidator.*.php3: Finish fixing bug #644709

This commit is contained in:
Robin Johnson
2003-01-16 07:37:46 +00:00
parent 013b1dab79
commit 88b02c7da6
3 changed files with 11 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ $Source$
* lang/sort_lang.sh: Fix status output bug '\n'
* db_details_importdocsql.php3: Move hardcoded strings to language files
* lang/*.php3: Add new strings for docSQL importer
* libraries/sqlvalidator.*.php3: Finish fixing bug #644709
2003-01-15 Alexander M. Turek <rabus@users.sourceforge.net>
* lang/lithuanian-*.inc.php3: Updates, thanks to Vilius Zigmantas (viliusz).

View File

@@ -402,6 +402,12 @@ if (!defined('PMA_SQL_VALIDATOR_CLASS_INCLUDED')) {
} // end of the "validationString()" function
} // end class PMA_SQLValidator
//add an extra check to ensure that the class was defined without errors
if (!class_exists('PMA_SQLValidator')) {
$GLOBALS['sqlvalidator_error'] = TRUE;
}
} // end else
} // $__PMA_SQL_VALIDATOR_CLASS__

View File

@@ -64,8 +64,10 @@ if (!defined('PMA_SQL_VALIDATOR_INCLUDED')) {
$str = '';
if ($cfg['SQLValidator']['use']) {
if (!(isset($GLOBALS['sqlvalidator_error'])
&& !$GLOBALS['sqlvalidator_error'])) {
if (isset($GLOBALS['sqlvalidator_error'])
&& $GLOBALS['sqlvalidator_error']) {
$str = sprintf($GLOBALS['strValidatorError'], '<a href="./Documentation.html#faqsqlvalidator" target="documentation">', '</a>');
} else {
// create new class instance
$srv = new PMA_SQLValidator();
@@ -87,10 +89,6 @@ if (!defined('PMA_SQL_VALIDATOR_INCLUDED')) {
// Do service validation
$str = $srv->validationString($sql);
} else {
$str = sprintf($GLOBALS['strValidatorError'], '<a href="./Documentation.html#faqsqlvalidator" target="documentation">', '</a>');
}
} // end if