From c8f38617cb2a5bacbe002117cf5c74e989364a5b Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 28 Aug 2007 02:49:31 +0000 Subject: [PATCH] #write:31 - Fixed redirection from /home/ to /./ in IE6 git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40980 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/ContentController.php | 4 ++-- core/control/Controller.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/control/ContentController.php b/core/control/ContentController.php index 8d2f143e9..bc09a6346 100644 --- a/core/control/ContentController.php +++ b/core/control/ContentController.php @@ -85,8 +85,8 @@ class ContentController extends Controller { if($this->dataRecord && RootURLController::should_be_on_root($this->dataRecord) && !$this->urlParams['Action'] && !$_POST && !$_FILES) { $getVars = $_GET; unset($getVars['url']); - if($getVars) $url = "./?" . http_build_query($getVars); - else $url = "./"; + if($getVars) $url = "?" . http_build_query($getVars); + else $url = ""; Director::redirect($url); return; } diff --git a/core/control/Controller.php b/core/control/Controller.php index 2e7cfe12a..20ab8cfce 100644 --- a/core/control/Controller.php +++ b/core/control/Controller.php @@ -407,7 +407,7 @@ class Controller extends ViewableData { */ function redirect($url) { // Attach site-root to relative links, if they have a slash in them - if(substr($url,0,4) != "http" && $url[0] != "/" && strpos($url,'/') !== false){ + if($url == "" || $url[0] == '?' || (substr($url,0,4) != "http" && $url[0] != "/" && strpos($url,'/') !== false)){ $url = Director::baseURL() . $url; }