From b235bb69823ff435da5a75353029e26352910208 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 10 Jun 2015 17:04:00 +0200 Subject: [PATCH] NotificationQuery: Select placeholder values when joining hosts, again I've missed that our notification list-view detects based on a attribute's value of which type a returned row is... refs #9009 --- .../Monitoring/Backend/Ido/Query/NotificationQuery.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php index 135875d07..b13a338b0 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php @@ -3,6 +3,7 @@ namespace Icinga\Module\Monitoring\Backend\Ido\Query; +use Zend_Db_Expr; use Zend_Db_Select; use Icinga\Data\Filter\Filter; @@ -96,8 +97,11 @@ class NotificationQuery extends IdoQuery protected function joinHosts() { $columns = array_keys( - $this->columnMap['notifications'] + $this->columnMap['hosts'] + $this->columnMap['services'] + $this->columnMap['notifications'] + $this->columnMap['hosts'] ); + foreach ($this->columnMap['services'] as $column => $_) { + $columns[$column] = new Zend_Db_Expr('NULL'); + } if ($this->fetchHistoryColumns) { $columns = array_merge($columns, array_keys($this->columnMap['history'])); }