ActionController: refine url handling on redirect

This commit is contained in:
Thomas Gelf 2014-06-20 13:18:03 +02:00
parent 7cad4de3be
commit dbf03ee647
1 changed files with 2 additions and 2 deletions

View File

@ -387,14 +387,14 @@ class ActionController extends Zend_Controller_Action
**/
public function redirectNow($url)
{
$url = Url::fromPath(preg_replace('~&~', '&', $url));
$url = 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->getRelativeUrl());
$this->_helper->Redirector->gotoUrlAndExit(Url::fromPath($url)->getRelativeUrl());
}
$this->isRedirect = true; // pretty useless right now
}