From 70717169c26a4e229c014a0a9a6f5030409505b5 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 29 Sep 2015 22:42:44 +0200 Subject: [PATCH] monitoring: Rearrange code in the ServicecommentQuery refs #9956 --- .../Backend/Ido/Query/ServicecommentQuery.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicecommentQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicecommentQuery.php index 70e7bda36..9887c7861 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicecommentQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicecommentQuery.php @@ -27,9 +27,6 @@ class ServicecommentQuery 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', @@ -56,6 +53,9 @@ class ServicecommentQuery extends IdoQuery 'host_alias' => 'h.alias', 'host_display_name' => 'h.display_name COLLATE latin1_general_ci' ), + 'instances' => array( + 'instance_name' => 'i.instance_name' + ), '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' ), @@ -154,6 +154,18 @@ class ServicecommentQuery extends IdoQuery ); } + /** + * Join instances + */ + protected function joinInstances() + { + $this->select->join( + array('i' => $this->prefix . 'instances'), + 'i.instance_id = c.instance_id', + array() + ); + } + /** * Join services */ @@ -177,16 +189,4 @@ class ServicecommentQuery extends IdoQuery array() ); } - - /** - * Join instances - */ - protected function joinInstances() - { - $this->select->join( - array('i' => $this->prefix . 'instances'), - 'i.instance_id = c.instance_id', - array() - ); - } }