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; - } }