From 21c69b95c567b16e1814dae448cc6701068de6b5 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Thu, 13 Dec 2007 21:50:40 +0000 Subject: [PATCH] Merged revisions 46640 via svnmerge from svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-privacy ........ r46640 | aoneil | 2007-12-12 13:36:48 +1300 (Wed, 12 Dec 2007) | 1 line Fix redirection in Director rules ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46781 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/Director.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/control/Director.php b/core/control/Director.php index 512a1bd28..941bba73e 100644 --- a/core/control/Director.php +++ b/core/control/Director.php @@ -66,13 +66,14 @@ class Director { if(isset($_GET['debug_profile'])) Profiler::mark("Director","direct"); $controllerObj = Director::getControllerForURL($url); - // Load the session into the controller - $controllerObj->setSession(new Session($_SESSION)); - if(is_string($controllerObj) && substr($controllerObj,0,9) == 'redirect:') { - Director::redirect(substr($controllerObj, 9)); - + $response = new HTTPResponse(); + $response->redirect(substr($controllerObj, 9)); + $response->output(); } else if($controllerObj) { + // Load the session into the controller + $controllerObj->setSession(new Session($_SESSION)); + $response = $controllerObj->run(array_merge((array)$_GET, (array)$_POST, (array)$_FILES));