From bb5e3e5fbd8bcd44bac477d5259f20e71fa7727c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 25 Jun 2012 14:00:39 +0200 Subject: [PATCH] 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. --- code/model/SiteTree.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index 6704b8db..18620015 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -2704,8 +2704,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR; if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR; - $types = self::page_type_classes(); - foreach($types as $type) { + $types = ClassInfo::subclassesFor('SiteTree'); + foreach($types as $k => $type) { $inst = singleton($type); $entities[$type . '.DESCRIPTION'] = array( $inst->stat('description'),