Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUG SiteTree->provideI18nEntities() limited to class

Called for each subclass by the collector,
so we don't need to aggregate here.
In fact, its harmful because it causes entities
to be placed in the wrong definitions file.
The <class>.DESCRIPTION entity was always placed in cms/lang/en.yml,
regardless of the original location of the file containing the class.
  • Loading branch information...
commit 39a9093715415014dbe248229e5b3729767cf1ee 1 parent e925401
@chillu chillu authored
Showing with 4 additions and 10 deletions.
  1. +4 −10 code/model/SiteTree.php
View
14 code/model/SiteTree.php
@@ -2712,16 +2712,10 @@ function provideI18nEntities() {
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;
- $types = ClassInfo::subclassesFor('SiteTree');
- foreach($types as $k => $type) {
- $inst = singleton($type);
- $entities[$type . '.DESCRIPTION'] = array(
- $inst->stat('description'),
-
- 'Description of the page type (shown in the "add page" dialog)'
- );
- }
-
+ $entities[$this->class . '.DESCRIPTION'] = array(
+ $this->stat('description'),
+ 'Description of the page type (shown in the "add page" dialog)'
+ );
return $entities;
}
Please sign in to comment.
Something went wrong with that request. Please try again.