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,9 +529,14 @@ class EcmFiles extends CommonObject
$sqlwhere = array();
if (count($filter) > 0) {
foreach ($filter as $key => $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';
/* Fetching this table depends on filepath+filename, it must not depends on entity
if (! empty($conf->multicompany->enabled)) {