Skip to content

Commit

Permalink
MINOR Remove DB dependency from SiteTree->provideEntities()
Browse files Browse the repository at this point in the history
Use class manifest instead, which provides same level of info,
and means we can run the text collector on bare checkouts
without a database set.
  • Loading branch information
chillu committed Jun 25, 2012
1 parent 1a3728c commit bb5e3e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/model/SiteTree.php
Expand Up @@ -2704,8 +2704,8 @@ function provideI18nEntities() {
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR; if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR; if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;


$types = self::page_type_classes(); $types = ClassInfo::subclassesFor('SiteTree');
foreach($types as $type) { foreach($types as $k => $type) {
$inst = singleton($type); $inst = singleton($type);
$entities[$type . '.DESCRIPTION'] = array( $entities[$type . '.DESCRIPTION'] = array(
$inst->stat('description'), $inst->stat('description'),
Expand Down

0 comments on commit bb5e3e5

Please sign in to comment.