Fix multiple contacts display in service and host detail pane

fixes #7329
This commit is contained in:
Alexander Fuhr 2014-10-31 11:34:48 +01:00
parent b38e3affb9
commit f095489017
1 changed files with 4 additions and 2 deletions

View File

@ -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;