Ido\Query\: Add objecttype_id checks where missing

This commit is contained in:
Johannes Meyer 2022-02-23 14:34:40 +01:00
parent 00353a1f25
commit 1092421782
2 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ class HostcontactQuery extends IdoQuery
[]
)->join(
['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(
['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',
[]
);
}

View File

@ -89,7 +89,7 @@ class ServicecontactQuery extends IdoQuery
[]
)->join(
['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(
['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',
[]
);
}