fix multicompny bug with getEntites without shared test

This commit is contained in:
Florian HENRY 2015-06-25 17:22:37 +02:00
parent 29a2185462
commit 9505d3a528

View File

@ -81,7 +81,7 @@ abstract class CommonObject
$sql = "SELECT rowid, ref, ref_ext";
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
$sql.= " WHERE entity IN (".getEntity($element).")" ;
$sql.= " WHERE entity IN (".getEntity($element,1).")" ;
if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";