#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
This commit is contained in:
Sam Minnee 2007-08-28 02:49:31 +00:00
parent 84e01faf1e
commit c8f38617cb
2 changed files with 3 additions and 3 deletions

View File

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

View File

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