ServiceController: trust the id if given
This way we are able to load invalid objects fixes #1172
This commit is contained in:
parent
d83cf594cc
commit
89660a500a
|
@ -231,7 +231,12 @@ class ServiceController extends ObjectController
|
|||
protected function loadObject()
|
||||
{
|
||||
if ($this->object === null) {
|
||||
if ($name = $this->params->get('name')) {
|
||||
if ($id = $this->params->get('id')) {
|
||||
$this->object = IcingaService::loadWithAutoIncId(
|
||||
(int) $id,
|
||||
$this->db()
|
||||
);
|
||||
} elseif ($name = $this->params->get('name')) {
|
||||
$params = array('object_name' => $name);
|
||||
$db = $this->db();
|
||||
|
||||
|
|
Loading…
Reference in New Issue