From f4e4dbe0693606003d8f05a6003af206a010129b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 30 Sep 2015 09:29:34 +0200 Subject: [PATCH] monitoring: Remove ServicedowntimeQuery::getGroup() refs #9956 --- .../Ido/Query/ServicedowntimeQuery.php | 43 +++++-------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimeQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimeQuery.php index 98f12f84d..a21be690e 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimeQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimeQuery.php @@ -13,6 +13,16 @@ class ServicedowntimeQuery extends IdoQuery */ protected $allowCustomVars = true; + /** + * {@inheritdoc} + */ + protected $groupBase = array('downtimes', array('sd.scheduleddowntime_id', 'so.object_id')); + + /** + * {@inheritdoc} + */ + protected $groupOrigin = array('hostgroups', 'servicegroups'); + /** * {@inheritdoc} */ @@ -185,37 +195,4 @@ class ServicedowntimeQuery extends IdoQuery array() ); } - - /** - * {@inheritdoc} - */ - public function getGroup() - { - $group = array(); - if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) { - $group = array('sd.scheduleddowntime_id', 'so.object_id'); - - if ($this->hasJoinedVirtualTable('hosts')) { - $group[] = 'h.host_id'; - } - - if ($this->hasJoinedVirtualTable('hoststatus')) { - $group[] = 'hs.hoststatus_id'; - } - - if ($this->hasJoinedVirtualTable('services')) { - $group[] = 's.service_id'; - } - - if ($this->hasJoinedVirtualTable('servicestatus')) { - $group[] = 'ss.servicestatus_id'; - } - - if ($this->hasJoinedVirtualTable('instances')) { - $group[] = 'i.instance_id'; - } - } - - return $group; - } }