mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Removed unnecessary HomepageForDomain query
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83812 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8f0d3c72c1
commit
004a1a2f24
@ -84,6 +84,9 @@ class RootURLController extends Controller {
|
||||
static function should_be_on_root(SiteTree $currentPage) {
|
||||
if(self::$is_at_root) return false;
|
||||
|
||||
if(!$currentPage->HomepageForDomain
|
||||
&& $currentPage->URLSegment != self::get_default_homepage_urlsegment()) return false;
|
||||
|
||||
$matchesHomepageSegment = (self::get_homepage_urlsegment() == $currentPage->URLSegment);
|
||||
// Don't redirect translated homepage segments,
|
||||
// as the redirection target '/' will show the default locale
|
||||
|
Loading…
Reference in New Issue
Block a user