diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index d8c42dc1e..c8675f51f 100644 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -415,33 +415,15 @@ class ActionController extends Zend_Controller_Action protected function redirectXhr($url) { - if (! $url instanceof Url) { - $url = Url::fromPath($url); - } - - if ($this->rerenderLayout) { - $this->getResponse()->setHeader('X-Icinga-Rerender-Layout', 'yes'); - } - if ($this->reloadCss) { - $this->getResponse()->setHeader('X-Icinga-Reload-Css', 'now'); - } - - $this->shutdownSession(); - $this->getResponse() - ->setHeader('X-Icinga-Redirect', rawurlencode($url->getAbsoluteUrl())) - ->sendHeaders(); - - exit; + ->setReloadCss($this->reloadCss) + ->setRerenderLayout($this->rerenderLayout) + ->redirectAndExit($url); } protected function redirectHttp($url) { - if (! $url instanceof Url) { - $url = Url::fromPath($url); - } - $this->shutdownSession(); - $this->_helper->Redirector->gotoUrlAndExit($url->getRelativeUrl()); + $this->getResponse()->redirectAndExit($url); } /**