mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Error check on homepage redirector (merged from branches/2.2.0, r44869)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44905 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ff0cefe74a
commit
87a4a1fcce
@ -75,7 +75,7 @@ class ContentController extends Controller {
|
||||
Statistics::collect();
|
||||
|
||||
// If we've accessed the homepage as /home/, then we should redirect to /.
|
||||
if($this->dataRecord && RootURLController::should_be_on_root($this->dataRecord) && !$this->urlParams['Action'] && !$_POST && !$_FILES) {
|
||||
if($this->dataRecord && $this->dataRecord instanceof SiteTree && RootURLController::should_be_on_root($this->dataRecord) && !$this->urlParams['Action'] && !$_POST && !$_FILES) {
|
||||
$getVars = $_GET;
|
||||
unset($getVars['url']);
|
||||
if($getVars) $url = "?" . http_build_query($getVars);
|
||||
|
Loading…
x
Reference in New Issue
Block a user