Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUG fix getting translated string for page type description (Fixes #7…

…781).
  • Loading branch information...
commit 4bbd90487b4ff0efa4bcb89085b87f4ebb764cb4 1 parent 18a40b4
@wilr wilr authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 code/controllers/CMSMain.php
View
13 code/controllers/CMSMain.php
@@ -466,9 +466,15 @@ public function PageTypes() {
$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 @@ public function PageTypes() {
}
$result = $result->sort('AddAction');
+
return $result;
}
Please sign in to comment.
Something went wrong with that request. Please try again.