mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-05 00:22:55 +01:00
Fix #yogosha15157
This commit is contained in:
@@ -145,11 +145,10 @@ class Receptions extends DolibarrApi
|
||||
// Add sql filters
|
||||
if ($sqlfilters) {
|
||||
$errormessage = '';
|
||||
if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
|
||||
throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage);
|
||||
$sql .= forgeSQLFromUniversalSearchCriteria($sqlfilters, $errormessage);
|
||||
if ($errormessage) {
|
||||
throw new RestException(400, 'Error when validating parameter sqlfilters -> '.$errormessage);
|
||||
}
|
||||
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
|
||||
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
|
||||
}
|
||||
|
||||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
|
||||
Reference in New Issue
Block a user