Code simpler

This commit is contained in:
Laurent Destailleur
2024-08-02 16:39:29 +02:00
parent d967409f86
commit dd61bff4da

View File

@@ -13383,7 +13383,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand =
// Test the filter syntax
$t = preg_replace_callback('/'.$regexstring.'/i', 'dolForgeDummyCriteriaCallback', $filter);
$t = str_replace(array('and','or','AND','OR',' '), '', $t); // Remove the only strings allowed between each () criteria
$t = str_ireplace(array('and', 'or', ' '), '', $t); // Remove the only strings allowed between each () criteria
// If the string result contains something else than '()', the syntax was wrong
if (preg_match('/[^\(\)]/', $t)) {