From 103a4dbe91e7a9ed46064abc8afba087c8d99083 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 15 Oct 2013 15:29:54 +0200 Subject: [PATCH] Service Status: Fix filter by hostgroup throwing an exception fixes #4747 --- .../library/Monitoring/Backend/Ido/Query/StatusQuery.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php index ac0afa128..a249c9e5b 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php @@ -286,9 +286,13 @@ class StatusQuery extends AbstractQuery array() )->join( array('hg' => $this->prefix . 'hostgroups'), - 'hgm.hostgroup_id = hg' . $this->hostgroup_id, + 'hgm.hostgroup_id = hg.' . $this->hostgroup_id, array() - ); + )->join( + array('hgo' => $this->prefix . 'objects'), + 'hgo.' . $this->object_id . ' = hg.hostgroup_object_id AND hgo.is_active = 1', + array() + ); return $this; }