ActionController: fix initial redirect

refs #6419
This commit is contained in:
Thomas Gelf 2014-06-06 08:31:00 +00:00
parent a5e9d6cf0d
commit e01629fe0b
1 changed files with 2 additions and 5 deletions

View File

@ -370,17 +370,14 @@ class ActionController extends Zend_Controller_Action
**/
public function redirectNow($url)
{
if (! $url instanceof Url) {
$url = Url::fromPath($url);
}
$url = preg_replace('~&~', '&', $url);
$url = Url::fromPath(preg_replace('~&~', '&', $url));
if ($this->_request->isXmlHttpRequest()) {
header('X-Icinga-Redirect: ' . rawurlencode($url));
// $this->getResponse()->sendHeaders() ??
// Session shutdown
exit; // Really?
} else {
$this->_helper->Redirector->gotoUrlAndExit($url);
$this->_helper->Redirector->gotoUrlAndExit($url->getRelativeUrl());
}
$this->isRedirect = true; // pretty useless right now
}