mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00: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();
|
$addAction = $instance->i18n_singular_name();
|
||||||
|
|
||||||
// Get description
|
// Get description
|
||||||
$description = _t($class . 'DESCRIPTION');
|
$description = _t($class . '.DESCRIPTION');
|
||||||
if(!$description) $description = $instance->uninherited('description');
|
|
||||||
if($class == 'Page' && !$description) $description = singleton('SiteTree')->uninherited('description');
|
if(!$description) {
|
||||||
|
$description = $instance->uninherited('description');
|
||||||
|
}
|
||||||
|
|
||||||
|
if($class == 'Page' && !$description) {
|
||||||
|
$description = singleton('SiteTree')->uninherited('description');
|
||||||
|
}
|
||||||
|
|
||||||
$result->push(new ArrayData(array(
|
$result->push(new ArrayData(array(
|
||||||
'ClassName' => $class,
|
'ClassName' => $class,
|
||||||
@ -480,6 +486,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = $result->sort('AddAction');
|
$result = $result->sort('AddAction');
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,11 +205,13 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
|||||||
$siteConfig->Tagline = _t('SiteConfig.TAGLINEDEFAULT',"your tagline here");
|
$siteConfig->Tagline = _t('SiteConfig.TAGLINEDEFAULT',"your tagline here");
|
||||||
|
|
||||||
if(class_exists('Translatable') && $siteConfig->hasExtension('Translatable')){
|
if(class_exists('Translatable') && $siteConfig->hasExtension('Translatable')){
|
||||||
$defaultConfig = DataObject::get_one('SiteConfig');
|
Translatable::disable_locale_filter();
|
||||||
if($defaultConfig){
|
$defaultConfig = SiteConfig::get()->first();
|
||||||
$siteConfig->Title = $defaultConfig->Title;
|
Translatable::enable_locale_filter();
|
||||||
$siteConfig->Tagline = $defaultConfig->Tagline;
|
|
||||||
}
|
if($defaultConfig){
|
||||||
|
return $defaultConfig->createTranslation($locale);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO Copy view/edit group settings
|
// TODO Copy view/edit group settings
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user