Skip to content
This repository
Browse code

MINOR Remove DB dependency from SiteTree->provideEntities()

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...
commit bb5e3e5fbd8bcd44bac477d5259f20e71fa7727c 1 parent 1a3728c
Ingo Schommer authored June 25, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  code/model/SiteTree.php
4  code/model/SiteTree.php
@@ -2704,8 +2704,8 @@ function provideI18nEntities() {
2704 2704
 		if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
2705 2705
 		if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;		
2706 2706
 
2707  
-		$types = self::page_type_classes();
2708  
-		foreach($types as $type) {
  2707
+		$types = ClassInfo::subclassesFor('SiteTree');
  2708
+		foreach($types as $k => $type) {
2709 2709
 			$inst = singleton($type);
2710 2710
 			$entities[$type . '.DESCRIPTION'] = array(
2711 2711
 				$inst->stat('description'),

0 notes on commit bb5e3e5

Please sign in to comment.
Something went wrong with that request. Please try again.