mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix/FIX #17545 get documents, false data problem
Fix on getting wrong data for products comparing with like operator
This commit is contained in:
@@ -529,7 +529,12 @@ class EcmFiles extends CommonObject
|
||||
$sqlwhere = array();
|
||||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
$sqlwhere [] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
||||
if($key == 't.src_object_id'){
|
||||
$sqlwhere [] = $key.' = '.$this->db->escape($value);
|
||||
}
|
||||
else{
|
||||
$sqlwhere [] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
||||
}
|
||||
}
|
||||
}
|
||||
$sql .= ' WHERE 1 = 1';
|
||||
|
||||
Reference in New Issue
Block a user