From 725da88e7593ee11ee57478c8fede23cf38e822b Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Tue, 21 Aug 2012 11:42:04 +1200 Subject: [PATCH] MINOR: Document config system bug hack --- code/DMSSiteTreeExtension.php | 1 + 1 file changed, 1 insertion(+) diff --git a/code/DMSSiteTreeExtension.php b/code/DMSSiteTreeExtension.php index cd98303..c4ef4a9 100644 --- a/code/DMSSiteTreeExtension.php +++ b/code/DMSSiteTreeExtension.php @@ -23,6 +23,7 @@ class DMSSiteTreeExtension extends DataExtension { //GridFieldLevelup::create($folder->ID)->setLinkSpec('admin/assets/show/%d') ); + // HACK: Create a singleton of DMSDocument to ensure extensions are applied before we try to get display fields. singleton('DMSDocument'); $gridFieldConfig->getComponentByType('GridFieldDataColumns')->setDisplayFields(Config::inst()->get('DMSDocument', 'display_fields')) ->setFieldCasting(array('LastChanged'=>"Date->Ago"))