Fixes for bugs in Loic's changes

This commit is contained in:
Robin Johnson
2002-08-06 17:15:39 +00:00
parent 09c1290781
commit f99a7c0463
2 changed files with 6 additions and 6 deletions

View File

@@ -1129,7 +1129,7 @@ if (typeof(document.getElementById) != 'undefined'
if (!empty($GLOBALS['show_as_php'])) { if (!empty($GLOBALS['show_as_php'])) {
$query_base = '$sql = "' . $query_base; $query_base = '$sql = "' . $query_base;
} else if (!empty($GLOBALS['validatequery'])) { } else if (!empty($GLOBALS['validatequery'])) {
$query_base = validateSQL($query_base); $query_base = PMA_validateSQL($query_base);
} else { } else {
$parsed_sql = PMA_SQP_parse($query_base); $parsed_sql = PMA_SQP_parse($query_base);
$query_base = PMA_formatSql($parsed_sql); $query_base = PMA_formatSql($parsed_sql);

View File

@@ -37,8 +37,10 @@ if (!defined('PMA_SQL_VALIDATOR_INCLUDED')) {
// We need the PEAR libraries, so do a minimum version check first // We need the PEAR libraries, so do a minimum version check first
// I'm not sure if PEAR was available before this point // I'm not sure if PEAR was available before this point
// For now we actually use a configuration flag // For now we actually use a configuration flag
if ($cfg['SQLValidator']['use'] == TRUE && !defined(PMA_SQL_VALIDATOR_CLASS_INCLUDED)) { if ($cfg['SQLValidator']['use'] == TRUE) {
include('./sqlvalidator.class.php3'); // We cannot check && !defined(PMA_SQL_VALIDATOR_CLASS_INCLUDED))
// as it will produce a nasty warning message
include('./libraries/sqlvalidator.class.php3');
} // if ($cfg['SQLValidator']['use'] == TRUE) } // if ($cfg['SQLValidator']['use'] == TRUE)
@@ -83,9 +85,7 @@ if (!defined('PMA_SQL_VALIDATOR_INCLUDED')) {
// Do service validation // Do service validation
$str = $srv->validationString($sql); $str = $srv->validationString($sql);
} } else {
}
else {
// The service is not available so note that properly // The service is not available so note that properly
$str = $GLOBALS['strValidatorDisabled']; $str = $GLOBALS['strValidatorDisabled'];
} // end if... else... } // end if... else...