Merge pull request #3101 from FHenry/3.7

FIX: multicompny bug with getEntites without shared test
This commit is contained in:
Juanjo Menent 2015-06-25 20:50:03 +02:00
commit a3b3ce9c77

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)."'";