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:
Sam Minnee 2009-08-05 05:30:04 +00:00
parent 8f0d3c72c1
commit 004a1a2f24

View File

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