mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-05 16:42:53 +01:00
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -2090,7 +2090,8 @@ abstract class CommonObject
|
||||
/**
|
||||
* Load properties id_previous and id_next by comparing $fieldid with $this->ref
|
||||
*
|
||||
* @param string $filter Optional filter. Example: " AND (t.field1 = 'aa' OR t.field2 = 'bb')". Do not allow user input data here.
|
||||
* @param string $filter Optional SQL filter. Example: "(t.field1 = 'aa' OR t.field2 = 'bb')". Do not allow user input data here.
|
||||
* Use SQL and not Universal Search Filter. @TODO Replace this with an USF string after changing all ->next_prev_filter
|
||||
* @param string $fieldid Name of field to use for the select MAX and MIN
|
||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||
* @return int <0 if KO, >0 if OK
|
||||
@@ -2155,7 +2156,7 @@ abstract class CommonObject
|
||||
}
|
||||
if (!empty($filter)) {
|
||||
if (!preg_match('/^\s*AND/i', $filter)) {
|
||||
$sql .= " AND "; // For backward compatibility
|
||||
$sql .= " AND ";
|
||||
}
|
||||
$sql .= $filter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user