forked from Wavyzz/dolibarr
Clean code and prepare a more powerfull phpunit check for sql forging.
This commit is contained in:
@@ -12697,6 +12697,9 @@ function jsonOrUnserialize($stringtodecode)
|
||||
*/
|
||||
function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand = 0, $nopar = 0, $noerror = 0)
|
||||
{
|
||||
if ($filter === '') {
|
||||
return '';
|
||||
}
|
||||
if (!preg_match('/^\(.*\)$/', $filter)) { // If $filter does not start and end with ()
|
||||
$filter = '(' . $filter . ')';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user