From a9588c9cc2eb3b71c40ae7058b46ffd3e7609361 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 29 Sep 2015 22:21:05 +0200 Subject: [PATCH] monitoring: Remove ContactgroupQuery::getGroup() refs #9956 --- .../Backend/Ido/Query/ContactgroupQuery.php | 34 ++++++------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php index fe552894c..346007c9d 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php @@ -13,6 +13,16 @@ class ContactgroupQuery extends IdoQuery */ protected $allowCustomVars = true; + /** + * {@inheritdoc} + */ + protected $groupBase = array('contactgroups' => array('cg.contactgroup_id', 'cgo.object_id')); + + /** + * {@inheritdoc} + */ + protected $groupOrigin = array('contacts', 'hosts', 'services'); + /** * {@inheritdoc} */ @@ -201,28 +211,4 @@ class ContactgroupQuery extends IdoQuery array() ); } - - /** - * {@inheritdoc} - */ - public function getGroup() - { - $group = array(); - if ($this->hasJoinedVirtualTable('hosts') || $this->hasJoinedVirtualTable('services')) { - $group = array('cg.contactgroup_id', 'cgo.object_id'); - if ($this->hasJoinedVirtualTable('contacts')) { - $group[] = 'c.contact_id'; - $group[] = 'co.object_id'; - } - } elseif ($this->hasJoinedVirtualTable('contacts')) { - $group = array( - 'cg.contactgroup_id', - 'cgo.object_id', - 'c.contact_id', - 'co.object_id' - ); - } - - return $group; - } }