mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Update commonobject.class.php
This commit is contained in:
@@ -2451,19 +2451,19 @@ abstract class CommonObject
|
||||
{
|
||||
if ($justsource)
|
||||
{
|
||||
$sql.= "fk_source = '".$sourceid."' AND sourcetype = '".$sourcetype."'";
|
||||
$sql.= "fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."'";
|
||||
if ($withtargettype) $sql.= " AND targettype = '".$targettype."'";
|
||||
}
|
||||
else if ($justtarget)
|
||||
{
|
||||
$sql.= "fk_target = '".$targetid."' AND targettype = '".$targettype."'";
|
||||
$sql.= "fk_target = ".$targetid." AND targettype = '".$targettype."'";
|
||||
if ($withsourcetype) $sql.= " AND sourcetype = '".$sourcetype."'";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.= "(fk_source = '".$sourceid."' AND sourcetype = '".$sourcetype."')";
|
||||
$sql.= " ".$clause." (fk_target = '".$targetid."' AND targettype = '".$targettype."')";
|
||||
$sql.= "(fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."')";
|
||||
$sql.= " ".$clause." (fk_target = ".$targetid." AND targettype = '".$targettype."')";
|
||||
}
|
||||
$sql .= ' ORDER BY sourcetype';
|
||||
//print $sql;
|
||||
|
||||
Reference in New Issue
Block a user