From f7f6bcc4472a7dff25b41179adc192b92f80d755 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 9 Sep 2014 09:31:15 +0200 Subject: [PATCH] Make Form base class more test friendly.. refs #5525 --- library/Icinga/Web/Form.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index ba15f8c41..fd5cbf510 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -162,8 +162,9 @@ class Form extends Zend_Form public function getRedirectUrl() { if ($this->redirectUrl === null) { + $url = Url::fromRequest(array(), $this->getRequest()); // Be sure to remove all form dependent params because we do not want to submit it again - $this->redirectUrl = Url::fromRequest()->without(array_keys($this->getElements())); + $this->redirectUrl = $url->without(array_keys($this->getElements())); } return $this->redirectUrl; @@ -312,7 +313,7 @@ class Form extends Zend_Form if ($this->getAction() === '') { // We MUST set an action as JS gets confused otherwise, if // this form is being displayed in an additional column - $this->setAction(Url::fromRequest()->getUrlWithout(array_keys($this->getElements()))); + $this->setAction(Url::fromRequest()->without(array_keys($this->getElements()))); } $this->created = true;