From b5561a830698515c39d51b1007000af1b8693186 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 29 Sep 2015 22:23:16 +0200 Subject: [PATCH] monitoring: Rearrange code in the HostcommentQuery refs #9956 --- .../Backend/Ido/Query/HostcommentQuery.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostcommentQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostcommentQuery.php index 756126ca8..07049c109 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostcommentQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostcommentQuery.php @@ -27,9 +27,6 @@ class HostcommentQuery extends IdoQuery * {@inheritdoc} */ protected $columnMap = array( - 'instances' => array( - 'instance_name' => 'i.instance_name' - ), 'comments' => array( 'comment_author' => 'c.author_name COLLATE latin1_general_ci', 'comment_author_name' => 'c.author_name', @@ -55,6 +52,9 @@ class HostcommentQuery extends IdoQuery 'hoststatus' => array( 'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END' ), + 'instances' => array( + 'instance_name' => 'i.instance_name' + ), 'servicegroups' => array( 'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci', 'servicegroup_name' => 'sgo.name1', @@ -127,6 +127,18 @@ class HostcommentQuery extends IdoQuery ); } + /** + * Join instances + */ + protected function joinInstances() + { + $this->select->join( + array('i' => $this->prefix . 'instances'), + 'i.instance_id = c.instance_id', + array() + ); + } + /** * Join service groups */ @@ -163,16 +175,4 @@ class HostcommentQuery extends IdoQuery array() ); } - - /** - * Join instances - */ - protected function joinInstances() - { - $this->select->join( - array('i' => $this->prefix . 'instances'), - 'i.instance_id = c.instance_id', - array() - ); - } }