mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUG fix getting translated string for page type description (Fixes #7781).
This commit is contained in:
parent
18a40b4b5d
commit
4bbd90487b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user