mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
ActionController: Ensure to utilize the response to redirect and exit
This commit is contained in:
parent
df04c0f837
commit
8ee6e763a6
@ -415,33 +415,15 @@ class ActionController extends Zend_Controller_Action
|
|||||||
|
|
||||||
protected function redirectXhr($url)
|
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()
|
$this->getResponse()
|
||||||
->setHeader('X-Icinga-Redirect', rawurlencode($url->getAbsoluteUrl()))
|
->setReloadCss($this->reloadCss)
|
||||||
->sendHeaders();
|
->setRerenderLayout($this->rerenderLayout)
|
||||||
|
->redirectAndExit($url);
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function redirectHttp($url)
|
protected function redirectHttp($url)
|
||||||
{
|
{
|
||||||
if (! $url instanceof Url) {
|
$this->getResponse()->redirectAndExit($url);
|
||||||
$url = Url::fromPath($url);
|
|
||||||
}
|
|
||||||
$this->shutdownSession();
|
|
||||||
$this->_helper->Redirector->gotoUrlAndExit($url->getRelativeUrl());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user