From c597a671f3484ac42496382a382a1d86474c689b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 29 Sep 2015 22:22:09 +0200 Subject: [PATCH] monitoring: Rearrange code in the ContactgroupQuery refs #9956 --- .../Backend/Ido/Query/ContactgroupQuery.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php index 346007c9d..aa51676af 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php @@ -27,9 +27,6 @@ class ContactgroupQuery extends IdoQuery * {@inheritdoc} */ protected $columnMap = array( - 'instances' => array( - 'instance_name' => 'i.instance_name' - ), 'contactgroups' => array( 'contactgroup' => 'cgo.name1 COLLATE latin1_general_ci', 'contactgroup_name' => 'cgo.name1', @@ -69,6 +66,9 @@ class ContactgroupQuery extends IdoQuery 'host_alias' => 'h.alias', 'host_display_name' => 'h.display_name COLLATE latin1_general_ci' ), + 'instances' => array( + 'instance_name' => 'i.instance_name' + ), 'servicegroups' => array( 'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci', 'servicegroup_name' => 'sgo.name1', @@ -159,6 +159,18 @@ class ContactgroupQuery extends IdoQuery ); } + /** + * Join instances + */ + protected function joinInstances() + { + $this->select->join( + array('i' => $this->prefix . 'instances'), + 'i.instance_id = cg.instance_id', + array() + ); + } + /** * Join service groups */ @@ -199,16 +211,4 @@ class ContactgroupQuery extends IdoQuery array() ); } - - /** - * Join instances - */ - protected function joinInstances() - { - $this->select->join( - array('i' => $this->prefix . 'instances'), - 'i.instance_id = cg.instance_id', - array() - ); - } }