From 2c204bb0b65fe78a0d18fec0cce49360964a22ae Mon Sep 17 00:00:00 2001 From: Florian Thoma Date: Thu, 1 Mar 2018 12:15:44 +1100 Subject: [PATCH] remove DMSSiteTreeExtension.getDocumentSets() because it messes with the page history (readonly mode) --- code/DMS.php | 2 +- code/extensions/DMSSiteTreeExtension.php | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/code/DMS.php b/code/DMS.php index 887e877..46950a0 100644 --- a/code/DMS.php +++ b/code/DMS.php @@ -151,7 +151,7 @@ class DMS extends Object implements DMSInterface public function getDocumentSetsByPage(SiteTree $page) { - return $page->getDocumentSets(); + return $page->DocumentSets(); } /** diff --git a/code/extensions/DMSSiteTreeExtension.php b/code/extensions/DMSSiteTreeExtension.php index abeb7de..a4c53aa 100644 --- a/code/extensions/DMSSiteTreeExtension.php +++ b/code/extensions/DMSSiteTreeExtension.php @@ -52,16 +52,6 @@ class DMSSiteTreeExtension extends DataExtension )); } - /** - * Get a list of document sets for the owner page - * - * @return ArrayList - */ - public function getDocumentSets() - { - return $this->owner->DocumentSets(); - } - /** * Get a list of all documents from all document sets for the owner page * @@ -71,7 +61,7 @@ class DMSSiteTreeExtension extends DataExtension { $documents = ArrayList::create(); - foreach ($this->getDocumentSets() as $documentSet) { + foreach ($this->owner->DocumentSets() as $documentSet) { /** @var DocumentSet $documentSet */ $documents->merge($documentSet->getDocuments()); }