From dbe2ad4f9fe818fe21755eff2ecf8d359c578736 Mon Sep 17 00:00:00 2001 From: Jonathon Menz Date: Tue, 19 May 2015 15:17:09 -0700 Subject: [PATCH] FIX: Folder expansion icons This is a companion fix for https://github.com/silverstripe/silverstripe-framework/pull/4202 --- code/controllers/AssetAdmin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index c0d83539..eff8b9bc 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -535,6 +535,7 @@ JS public function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $numChildrenMethod = null, $filterFunction = null, $minNodeCount = 30) { if (!$childrenMethod) $childrenMethod = 'ChildFolders'; + if (!$numChildrenMethod) $numChildrenMethod = 'numChildFolders'; return parent::getSiteTreeFor($className, $rootID, $childrenMethod, $numChildrenMethod, $filterFunction, $minNodeCount); } @@ -543,7 +544,7 @@ JS } public function SiteTreeAsUL() { - return $this->getSiteTreeFor($this->stat('tree_class'), null, 'ChildFolders'); + return $this->getSiteTreeFor($this->stat('tree_class'), null, 'ChildFolders', 'numChildFolders'); } //------------------------------------------------------------------------------------------//