From f80a61d9e5a718cf9de3e2dfb2d92c0ef793f7ad Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 15 Jul 2019 16:35:27 +0200 Subject: [PATCH] Respect notification type of subqueries --- .../Backend/Ido/Query/NotificationhistoryQuery.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationhistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationhistoryQuery.php index b159a7415..f08a2b916 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationhistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationhistoryQuery.php @@ -27,7 +27,7 @@ class NotificationhistoryQuery extends IdoQuery 'output' => 'n.output', 'state' => 'n.state', 'timestamp' => 'n.timestamp', - 'type' => "('notify')" + 'type' => 'n.type' ), 'hosts' => array( 'host_display_name' => 'n.host_display_name', @@ -79,9 +79,6 @@ class NotificationhistoryQuery extends IdoQuery $columns[$column] = new Zend_Db_Expr('NULL'); } } - if (isset($columns['type'])) { - unset($columns['type']); - } $hosts = $this->createSubQuery('hostnotification', $columns); $this->subQueries[] = $hosts; $this->notificationQuery->union(array($hosts), Zend_Db_Select::SQL_UNION_ALL); @@ -93,9 +90,6 @@ class NotificationhistoryQuery extends IdoQuery protected function joinServices() { $columns = array_flip($this->desiredColumns); - if (isset($columns['type'])) { - unset($columns['type']); - } $services = $this->createSubQuery('servicenotification', array_flip($columns)); $this->subQueries[] = $services; $this->notificationQuery->union(array($services), Zend_Db_Select::SQL_UNION_ALL);