mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX SiteTree::getSiteConfig() should always fall back to using a default if an alternate config wasn't found (from r100932)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111544 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e41c7eeede
commit
37bc333882
@ -973,8 +973,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
* Stub method to get the site config, provided so it's easy to override
|
||||
*/
|
||||
function getSiteConfig() {
|
||||
if ($this->hasMethod('alternateSiteConfig')) {
|
||||
return $this->alternateSiteConfig();
|
||||
$altConfig = false;
|
||||
if($this->hasMethod('alternateSiteConfig')) {
|
||||
$altConfig = $this->alternateSiteConfig();
|
||||
}
|
||||
if($altConfig) {
|
||||
return $altConfig;
|
||||
} elseif($this->hasExtension('Translatable')) {
|
||||
return SiteConfig::current_site_config($this->Locale);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user