diff options
Diffstat (limited to 'app/Core/Http/Response.php')
-rw-r--r-- | app/Core/Http/Response.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Core/Http/Response.php b/app/Core/Http/Response.php index 7fefddeb..a0d8137b 100644 --- a/app/Core/Http/Response.php +++ b/app/Core/Http/Response.php @@ -68,11 +68,12 @@ class Response extends Base * * @access public * @param string $url Redirection URL + * @param boolean $self If Ajax request and true: refresh the current page */ - public function redirect($url) + public function redirect($url, $self = false) { if ($this->request->getServerVariable('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest') { - header('X-Ajax-Redirect: '.$url); + header('X-Ajax-Redirect: '.($self ? 'self' : $url)); } else { header('Location: '.$url); } |