ScheduleDowntimeForm: replace obsolete ::fromRequest

A serious fix would involve passing the current backend to our
command forms.
This commit is contained in:
Thomas Gelf 2014-06-23 13:35:58 +02:00
parent ba9a633b73
commit 4d42b4d2c4
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ use Icinga\Module\Monitoring\Backend;
use Icinga\Module\Monitoring\Command\ScheduleDowntimeCommand;
use Icinga\Module\Monitoring\Object\AbstractObject;
use Icinga\Module\Monitoring\Object\Service;
use Icinga\Web\Url;
/**
* Form for scheduling downtimes
@ -91,7 +92,7 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
$cfg = $this->getConfiguration();
$preferences = $this->getUserPreferences();
$object = AbstractObject::fromRequest($this->getRequest());
$object = AbstractObject::fromParams(Url::fromRequest()->getParams());
$object->fetchDowntimes();
$downtimes = $object->downtimes;
/*