BUGFIX: implementing DocumentSort so that it doesn't break unit tests

This commit is contained in:
Julian Seidenberg 2012-10-10 13:44:37 +13:00
parent 8895b4f907
commit 179f2294e4
2 changed files with 1 additions and 6 deletions

View File

@ -32,11 +32,6 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
'LastChanged'=>'LastChanged' 'LastChanged'=>'LastChanged'
); );
static $default_sort = array(
'DocumentSort ASC'
);
static $singular_name = 'Document'; static $singular_name = 'Document';
static $plural_name = 'Documents'; static $plural_name = 'Documents';

View File

@ -69,7 +69,7 @@ class DMSSiteTreeExtension extends DataExtension {
$gridField = GridField::create( $gridField = GridField::create(
'Documents', 'Documents',
false, false,
$this->owner->Documents(), $this->owner->Documents()->Sort('DocumentSort'),
$gridFieldConfig $gridFieldConfig
); );
$gridField->addExtraClass('documents'); $gridField->addExtraClass('documents');