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
This commit is contained in:
Andrew O'Neil 2007-12-13 21:50:40 +00:00
parent 8fc8eec672
commit 21c69b95c5

View File

@ -66,13 +66,14 @@ class Director {
if(isset($_GET['debug_profile'])) Profiler::mark("Director","direct");
$controllerObj = Director::getControllerForURL($url);
if(is_string($controllerObj) && substr($controllerObj,0,9) == 'redirect:') {
$response = new HTTPResponse();
$response->redirect(substr($controllerObj, 9));
$response->output();
} else if($controllerObj) {
// 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));
} else if($controllerObj) {
$response = $controllerObj->run(array_merge((array)$_GET, (array)$_POST, (array)$_FILES));