mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fixed URLSegment access for translated homepages in SiteTree->RelativeLink (#4781, thanks martijn) (from r97211)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102434 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e717044628
commit
36dbefedcf
@ -376,8 +376,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$base = $this->URLSegment;
|
||||
}
|
||||
|
||||
// Unset base for homepage URLSegments in their default language.
|
||||
// Homepages with action parameters or in different languages
|
||||
// need to retain their URLSegment.
|
||||
if(!$action && $base == RootURLController::get_homepage_link()) {
|
||||
$base = null;
|
||||
if($this->hasExtension('Translatable') && $this->Locale != Translatable::default_locale()){
|
||||
$base = $this->URLSegment;
|
||||
}
|
||||
}
|
||||
|
||||
if(is_string($action)) {
|
||||
|
Loading…
Reference in New Issue
Block a user