mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge remote-tracking branch 'origin/3.0'
This commit is contained in:
commit
c3949f899e
@ -466,9 +466,15 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
$addAction = $instance->i18n_singular_name();
|
||||
|
||||
// Get description
|
||||
$description = _t($class . 'DESCRIPTION');
|
||||
if(!$description) $description = $instance->uninherited('description');
|
||||
if($class == 'Page' && !$description) $description = singleton('SiteTree')->uninherited('description');
|
||||
$description = _t($class . '.DESCRIPTION');
|
||||
|
||||
if(!$description) {
|
||||
$description = $instance->uninherited('description');
|
||||
}
|
||||
|
||||
if($class == 'Page' && !$description) {
|
||||
$description = singleton('SiteTree')->uninherited('description');
|
||||
}
|
||||
|
||||
$result->push(new ArrayData(array(
|
||||
'ClassName' => $class,
|
||||
@ -480,6 +486,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
}
|
||||
|
||||
$result = $result->sort('AddAction');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -205,10 +205,12 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
||||
$siteConfig->Tagline = _t('SiteConfig.TAGLINEDEFAULT',"your tagline here");
|
||||
|
||||
if(class_exists('Translatable') && $siteConfig->hasExtension('Translatable')){
|
||||
$defaultConfig = DataObject::get_one('SiteConfig');
|
||||
Translatable::disable_locale_filter();
|
||||
$defaultConfig = SiteConfig::get()->first();
|
||||
Translatable::enable_locale_filter();
|
||||
|
||||
if($defaultConfig){
|
||||
$siteConfig->Title = $defaultConfig->Title;
|
||||
$siteConfig->Tagline = $defaultConfig->Tagline;
|
||||
return $defaultConfig->createTranslation($locale);
|
||||
}
|
||||
|
||||
// TODO Copy view/edit group settings
|
||||
|
Loading…
Reference in New Issue
Block a user