From e1106491840413c5ca858fd699ef15772906b9fb Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 29 Sep 2015 22:16:35 +0200 Subject: [PATCH] monitoring: Remove ContactQuery::getGroup() refs #9956 --- .../Backend/Ido/Query/ContactQuery.php | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactQuery.php index ac99f1413..8e3b864d5 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactQuery.php @@ -13,6 +13,16 @@ class ContactQuery extends IdoQuery */ protected $allowCustomVars = true; + /** + * {@inheritdoc} + */ + protected $groupBase = array('contacts' => array('co.object_id', 'c.contact_id')); + + /** + * {@inheritdoc} + */ + protected $groupOrigin = array('hosts', 'services'); + /** * {@inheritdoc} */ @@ -197,21 +207,4 @@ class ContactQuery extends IdoQuery array() ); } - - /** - * {@inheritdoc} - */ - public function getGroup() - { - $group = array(); - if ($this->hasJoinedVirtualTable('hosts') || $this->hasJoinedVirtualTable('services')) { - $group = array('c.contact_id', 'co.object_id'); - if ($this->hasJoinedVirtualTable('timeperiods')) { - $group[] = 'ht.timeperiod_id'; - $group[] = 'st.timeperiod_id'; - } - } - - return $group; - } }