diff --git a/code/DMS.php b/code/DMS.php index 0785ff1..966cef0 100644 --- a/code/DMS.php +++ b/code/DMS.php @@ -151,7 +151,7 @@ class DMS extends SS_Object implements DMSInterface public function getDocumentSetsByPage(SiteTree $page) { - return $page->DocumentSets(); + return $page->getDocumentSets(); } /** diff --git a/code/extensions/DMSSiteTreeExtension.php b/code/extensions/DMSSiteTreeExtension.php index a6f6959..abeb7de 100644 --- a/code/extensions/DMSSiteTreeExtension.php +++ b/code/extensions/DMSSiteTreeExtension.php @@ -55,14 +55,11 @@ class DMSSiteTreeExtension extends DataExtension /** * Get a list of document sets for the owner page * - * @deprecated 3.0 Use DocumentSets() instead. - * * @return ArrayList */ public function getDocumentSets() { - Deprecation::notice('3.0', 'Use DocumentSets() instead'); - return $this->owner->hasManyComponent('DocumentSets'); + return $this->owner->DocumentSets(); } /** @@ -74,7 +71,7 @@ class DMSSiteTreeExtension extends DataExtension { $documents = ArrayList::create(); - foreach ($this->owner->DocumentSets() as $documentSet) { + foreach ($this->getDocumentSets() as $documentSet) { /** @var DocumentSet $documentSet */ $documents->merge($documentSet->getDocuments()); } diff --git a/code/model/DMSDocument.php b/code/model/DMSDocument.php index 7176eab..228983f 100644 --- a/code/model/DMSDocument.php +++ b/code/model/DMSDocument.php @@ -820,12 +820,12 @@ class DMSDocument extends DataObject implements DMSDocumentInterface new GridFieldDataColumns(), new GridFieldPaginator(30) ); + $versionsGridFieldConfig->getComponentByType('GridFieldDataColumns') ->setDisplayFields(Config::inst()->get('DMSDocument_versions', 'display_fields')) ->setFieldFormatting( array( - 'FilenameWithoutID' => '' - . '$FilenameWithoutID' + 'FilenameWithoutID' => '$FilenameWithoutID' ) ); diff --git a/composer.json b/composer.json index ca61e2e..1494360 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,8 @@ "silverstripe/framework": "^3.5", "silverstripe/cms": "^3.5", "symbiote/silverstripe-gridfieldextensions": "^2.0", - "silverstripe/taxonomy": "^1.2" + "silverstripe/taxonomy": "^1.2", + "mustangostang/spyc": "<=0.6.2" }, "suggest": { "undefinedoffset/sortablegridfield": "Allow documents to be reordered via drag-and-drop" diff --git a/templates/Includes/DocumentSets.ss b/templates/Includes/DocumentSets.ss index 3998fa8..632fb29 100644 --- a/templates/Includes/DocumentSets.ss +++ b/templates/Includes/DocumentSets.ss @@ -1,6 +1,6 @@ -<% if $DocumentSets %> +<% if $getDocumentSets %>