Creating another task stay in the popover

This commit is contained in:
Frederic Guillot
2015-09-05 17:06:01 -04:00
parent ccaf78b348
commit 70d3340cd0
9 changed files with 78 additions and 43 deletions

View File

@@ -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;
}