mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Ido\Query\: Add objecttype_id checks where missing
This commit is contained in:
parent
9a78fab17b
commit
00bf541857
@ -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',
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ class HostserviceproblemsummaryQuery extends IdoQuery
|
||||
array()
|
||||
)->join(
|
||||
array('s' => $this->prefix . 'services'),
|
||||
's.service_object_id = so.object_id AND so.is_active = 1',
|
||||
's.service_object_id = so.object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||
array()
|
||||
);
|
||||
$this->select->group('so.name1');
|
||||
|
@ -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',
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user