Update commonobject.class.php
This commit is contained in:
parent
9019576394
commit
262dcbea2c
@ -2451,19 +2451,19 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
if ($justsource)
|
if ($justsource)
|
||||||
{
|
{
|
||||||
$sql.= "fk_source = '".$sourceid."' AND sourcetype = '".$sourcetype."'";
|
$sql.= "fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."'";
|
||||||
if ($withtargettype) $sql.= " AND targettype = '".$targettype."'";
|
if ($withtargettype) $sql.= " AND targettype = '".$targettype."'";
|
||||||
}
|
}
|
||||||
else if ($justtarget)
|
else if ($justtarget)
|
||||||
{
|
{
|
||||||
$sql.= "fk_target = '".$targetid."' AND targettype = '".$targettype."'";
|
$sql.= "fk_target = ".$targetid." AND targettype = '".$targettype."'";
|
||||||
if ($withsourcetype) $sql.= " AND sourcetype = '".$sourcetype."'";
|
if ($withsourcetype) $sql.= " AND sourcetype = '".$sourcetype."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql.= "(fk_source = '".$sourceid."' AND sourcetype = '".$sourcetype."')";
|
$sql.= "(fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."')";
|
||||||
$sql.= " ".$clause." (fk_target = '".$targetid."' AND targettype = '".$targettype."')";
|
$sql.= " ".$clause." (fk_target = ".$targetid." AND targettype = '".$targettype."')";
|
||||||
}
|
}
|
||||||
$sql .= ' ORDER BY sourcetype';
|
$sql .= ' ORDER BY sourcetype';
|
||||||
//print $sql;
|
//print $sql;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user