Merge pull request #17546 from kastoras/fix_get_documents_response_problem

Fix #17545 /get /documents response data problem
This commit is contained in:
Laurent Destailleur 2021-05-11 18:53:02 +02:00 committed by GitHub
commit fe4227d04d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -529,7 +529,11 @@ 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.' = '.((int) $value);
} else {
$sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
}
}
}
$sql .= ' WHERE 1 = 1';