Leave note about __SELF__ in our action controller

refs #8626
This commit is contained in:
Eric Lippmann 2015-03-11 21:40:14 +01:00
parent 7f94858b8d
commit 4ebfbf83ab

View File

@ -307,6 +307,8 @@ class ActionController extends Zend_Controller_Action
$afterLogin = Url::fromPath($afterLogin); $afterLogin = Url::fromPath($afterLogin);
} }
if ($this->isXhr()) { if ($this->isXhr()) {
// __SELF__ instructs JavaScript to redirect to the current window's URL in case it's an auto-refreshing
// request or to redirect to the URL which required login in case it's not an auto-refreshing one
$redir = '__SELF__'; $redir = '__SELF__';
} else { } else {
// TODO: Ignore /? // TODO: Ignore /?
@ -319,7 +321,6 @@ class ActionController extends Zend_Controller_Action
if ($redir) { if ($redir) {
$url->setParam('redirect', $redir); $url->setParam('redirect', $redir);
} }
$this->rerenderLayout()->redirectNow($url); $this->rerenderLayout()->redirectNow($url);
} }