From 2c3da5969a68cc528848b474a30aee49c9df905d Mon Sep 17 00:00:00 2001
From: Thomas Gelf <thomas@gelf.net>
Date: Sun, 9 Mar 2014 19:39:32 +0100
Subject: [PATCH] Great, sortControl is not alias-aware. Fix comment sort
 options

---
 .../monitoring/application/controllers/ListController.php | 8 ++++----
 .../monitoring/library/Monitoring/DataView/Comment.php    | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php
index b620fd75a..383ebfdf9 100644
--- a/modules/monitoring/application/controllers/ListController.php
+++ b/modules/monitoring/application/controllers/ListController.php
@@ -337,10 +337,10 @@ class Monitoring_ListController extends Controller
 
         $this->setupSortControl(
             array(
-                'timestamp'  => 'Comment Timestamp',
-                'host'       => 'Host / Service',
-                'type'       => 'Comment Type',
-                'expiration' => 'Expiration',
+                'comment_timestamp'  => 'Comment Timestamp',
+                'host_name'          => 'Host / Service',
+                'comment_type'       => 'Comment Type',
+                'comment_expiration_timestamp' => 'Expiration',
             )
         );
         $this->handleFormatRequest($query);
diff --git a/modules/monitoring/library/Monitoring/DataView/Comment.php b/modules/monitoring/library/Monitoring/DataView/Comment.php
index 330f8525f..2bf26c97e 100644
--- a/modules/monitoring/library/Monitoring/DataView/Comment.php
+++ b/modules/monitoring/library/Monitoring/DataView/Comment.php
@@ -69,7 +69,7 @@ class Comment extends DataView
             'host_name' => array(
                 'columns' => array(
                     'host_name',
-                    'service_name'
+                    'service_description'
                 ),
                 'order' => self::SORT_ASC
             ),