Ido\Query\: Add objecttype_id checks where missing
This commit is contained in:
parent
00353a1f25
commit
1092421782
|
@ -89,7 +89,7 @@ class HostcontactQuery extends IdoQuery
|
||||||
[]
|
[]
|
||||||
)->join(
|
)->join(
|
||||||
['co' => $this->prefix . 'objects'],
|
['co' => $this->prefix . 'objects'],
|
||||||
'co.object_id = c.contact_object_id AND co.is_active = 1',
|
'co.object_id = c.contact_object_id AND co.is_active = 1 AND co.objecttype_id = 10',
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ class HostcontactQuery extends IdoQuery
|
||||||
[]
|
[]
|
||||||
)->joinLeft(
|
)->joinLeft(
|
||||||
['ho' => $this->prefix . 'objects'],
|
['ho' => $this->prefix . 'objects'],
|
||||||
'ho.object_id = h.host_object_id AND ho.is_active = 1',
|
'ho.object_id = h.host_object_id AND ho.is_active = 1 AND ho.objecttype_id = 1',
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ class ServicecontactQuery extends IdoQuery
|
||||||
[]
|
[]
|
||||||
)->join(
|
)->join(
|
||||||
['co' => $this->prefix . 'objects'],
|
['co' => $this->prefix . 'objects'],
|
||||||
'co.object_id = c.contact_object_id AND co.is_active = 1',
|
'co.object_id = c.contact_object_id AND co.is_active = 1 AND co.objecttype_id = 10',
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ class ServicecontactQuery extends IdoQuery
|
||||||
[]
|
[]
|
||||||
)->joinLeft(
|
)->joinLeft(
|
||||||
['ho' => $this->prefix . 'objects'],
|
['ho' => $this->prefix . 'objects'],
|
||||||
'ho.object_id = h.host_object_id AND ho.is_active = 1',
|
'ho.object_id = h.host_object_id AND ho.is_active = 1 AND ho.objecttype_id = 1',
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue