From a70524417e9a4912fe41ed68d12a6888a5e149f7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 16 Jun 2015 09:39:37 +0200 Subject: [PATCH] HostcommenthistoryQuery: Fix invalid joins refs #9009 --- .../Ido/Query/HostcommenthistoryQuery.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostcommenthistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostcommenthistoryQuery.php index 60f91cb15..5202d6f79 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostcommenthistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostcommenthistoryQuery.php @@ -85,15 +85,15 @@ class HostcommenthistoryQuery extends IdoQuery */ protected function joinHostgroups() { - $this->select->join( + $this->select->joinLeft( array('hgm' => $this->prefix . 'hostgroup_members'), 'hgm.host_object_id = ho.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() @@ -119,15 +119,15 @@ class HostcommenthistoryQuery extends IdoQuery protected function joinServicegroups() { $this->requireVirtualTable('services'); - $this->select->join( + $this->select->joinLeft( array('sgm' => $this->prefix . 'servicegroup_members'), 'sgm.service_object_id = s.service_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() @@ -139,11 +139,11 @@ class HostcommenthistoryQuery extends IdoQuery */ protected function joinServices() { - $this->select->join( + $this->select->joinLeft( array('s' => $this->prefix . 'services'), 's.host_object_id = ho.object_id', array() - )->join( + )->joinLeft( array('so' => $this->prefix . 'objects'), 'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2', array()