ServiceController: object loading, id support

This commit is contained in:
Thomas Gelf 2016-03-06 14:26:48 +01:00
parent cef7090666
commit ad415e4fa6

View File

@ -43,7 +43,8 @@ class ServiceController extends ObjectController
protected function loadObject() protected function loadObject()
{ {
if ($this->object === null && $name = $this->params->get('name')) { if ($this->object === null) {
if ($name = $this->params->get('name')) {
$params = array('object_name' => $name); $params = array('object_name' => $name);
$db = $this->db(); $db = $this->db();
@ -53,6 +54,9 @@ class ServiceController extends ObjectController
} }
$this->object = IcingaService::load($params, $db); $this->object = IcingaService::load($params, $db);
} else {
parent::loadObject();
}
} }
return $this->object; return $this->object;