2
0
forked from Wavyzz/dolibarr

Fix/FIX #17545 get documents, false data problem

Fix on getting wrong data for products comparing with like operator
This commit is contained in:
kastoras
2021-05-08 23:03:08 +03:00
parent 852360de4a
commit 6fa85efd0f

View File

@@ -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';