From 70d3340cd0c9d7a009c186b14ca436e9c4e61aa5 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 5 Sep 2015 17:06:01 -0400 Subject: Creating another task stay in the popover --- app/Core/Response.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/Core/Response.php') diff --git a/app/Core/Response.php b/app/Core/Response.php index d42a8f1e..f8ca015c 100644 --- a/app/Core/Response.php +++ b/app/Core/Response.php @@ -66,7 +66,13 @@ class Response */ public function redirect($url) { - header('Location: '.$url); + if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest') { + header('X-Ajax-Redirect: '.$url); + } + else { + header('Location: '.$url); + } + exit; } -- cgit v1.2.3