From 755da0c21090df1437245a7d05f0703151b6796b Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 16 Jun 2015 09:41:36 +0200 Subject: [PATCH] ServicedowntimestarthistoryQuery: Fix invalid joins refs #9009 --- .../Ido/Query/ServicedowntimestarthistoryQuery.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimestarthistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimestarthistoryQuery.php index b60d13d5d..80c08f735 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimestarthistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimestarthistoryQuery.php @@ -96,15 +96,15 @@ class ServicedowntimestarthistoryQuery extends IdoQuery protected function joinHostgroups() { $this->requireVirtualTable('services'); - $this->select->join( + $this->select->joinLeft( array('hgm' => $this->prefix . 'hostgroup_members'), 'hgm.host_object_id = s.host_object_id', array() - )->join( + )->joinLeft( array('hg' => $this->prefix . 'hostgroups'), 'hg.hostgroup_id = hgm.hostgroup_id', array() - )->join( + )->joinLeft( array('hgo' => $this->prefix . 'objects'), 'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3', array() @@ -130,15 +130,15 @@ class ServicedowntimestarthistoryQuery extends IdoQuery */ protected function joinServicegroups() { - $this->select->join( + $this->select->joinLeft( array('sgm' => $this->prefix . 'servicegroup_members'), 'sgm.service_object_id = so.object_id', array() - )->join( + )->joinLeft( array('sg' => $this->prefix . 'servicegroups'), 'sg.' . $this->servicegroup_id . ' = sgm.servicegroup_id', array() - )->join( + )->joinLeft( array('sgo' => $this->prefix . 'objects'), 'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4', array()