Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2023-03-13 10:33:47 +01:00
4 changed files with 13 additions and 9 deletions

View File

@@ -11685,7 +11685,10 @@ function dolForgeCriteriaCallback($matches)
return '';
}
$operator = strtoupper(preg_replace('/[^a-z<>=!]/i', '', trim($tmp[1])));
$operand = preg_replace('/[^a-z0-9\._]/i', '', trim($tmp[0]));
$operator = strtoupper(preg_replace('/[^a-z<>!=]/i', '', trim($tmp[1])));
if ($operator == 'NOTLIKE') {
$operator = 'NOT LIKE';
}
@@ -11723,7 +11726,7 @@ function dolForgeCriteriaCallback($matches)
}
}
return $db->escape($tmp[0]).' '.strtoupper($operator).' '.$tmpescaped;
return $db->escape($operand).' '.strtoupper($operator).' '.$tmpescaped;
}