From faa9b41fb852f108edc5e602160f7ef9f15f99f2 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 17 Sep 2015 17:30:38 +0200 Subject: [PATCH] monitoring: Clear order of the HoststatusQuery used in the HostserviceproblemsummaryQuery --- .../Ido/Query/HostserviceproblemsummaryQuery.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostserviceproblemsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostserviceproblemsummaryQuery.php index 8ae6f98c8..794d51342 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostserviceproblemsummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostserviceproblemsummaryQuery.php @@ -55,8 +55,10 @@ class HostserviceproblemsummaryQuery extends IdoQuery public function setHoststatusQuery(HoststatusQuery $query) { $this->hostStatusQuery = clone $query; - $this->hostStatusQuery->setIsSubQuery(); - $this->hostStatusQuery->columns(array('object_id')); + $this->hostStatusQuery + ->clearOrder() + ->setIsSubQuery() + ->columns(array('object_id')); return $this; } @@ -70,12 +72,10 @@ class HostserviceproblemsummaryQuery extends IdoQuery array() )->join( array('s' => $this->prefix . 'services'), - 's.service_object_id = so.object_id', + 's.service_object_id = so.object_id AND so.is_active = 1', array() ); - - $this->select->group(array('so.name1')); - $this->select->where('so.is_active = 1'); + $this->select->group(array('so.object_id')); $this->joinedVirtualTables['services'] = true; }