mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-23 18:07:44 +02:00
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()
|
protected function loadObject()
|
||||||
{
|
{
|
||||||
if ($this->object === null) {
|
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);
|
$params = array('object_name' => $name);
|
||||||
$db = $this->db();
|
$db = $this->db();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user