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.
This commit is contained in:
Ingo Schommer 2012-06-25 14:00:39 +02:00
parent 1a3728ccf6
commit bb5e3e5fbd

View File

@ -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'),