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
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100932 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1ec5c18ab5
commit
a93107f4d4
@ -955,8 +955,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
* Stub method to get the site config, provided so it's easy to override
|
||||
*/
|
||||
function getSiteConfig() {
|
||||
$altConfig = false;
|
||||
if($this->hasMethod('alternateSiteConfig')) {
|
||||
return $this->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