mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#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:
parent
84e01faf1e
commit
c8f38617cb
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user