Remove the useless if
This commit is contained in:
parent
91885c9d6f
commit
44c46d68ed
@ -70,8 +70,7 @@ abstract class CommonObject
|
|||||||
$sql = "SELECT rowid, ref, ref_ext";
|
$sql = "SELECT rowid, ref, ref_ext";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
|
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
|
||||||
|
|
||||||
if($conf->multicompany->enabled)$sql.= " WHERE entity=".$conf->entity;
|
$sql.= " WHERE entity=".$conf->entity;
|
||||||
else $sql.=" WHERE 1 ";
|
|
||||||
|
|
||||||
if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
|
if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
|
||||||
else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";
|
else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user