From f09548901721de535811497e29fe9f8474de0dd2 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Fri, 31 Oct 2014 11:34:48 +0100 Subject: [PATCH] Fix multiple contacts display in service and host detail pane fixes #7329 --- .../library/Monitoring/Object/MonitoredObject.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 3d3bde8dd..36b36710c 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -317,10 +317,12 @@ abstract class MonitoredObject 'contact_alias', 'contact_email', 'contact_pager', - )) - ->where('host_name', $this->host_name); + )); if ($this->type === self::TYPE_SERVICE) { + $contacts->where('service_host_name', $this->host_name); $contacts->where('service_description', $this->service_description); + } else { + $contacts->where('host_name', $this->host_name); } $this->contacts = $contacts->getQuery()->fetchAll(); return $this;