BUGFIX #3590: Allow subclassing of Folder

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@72693 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-03-09 22:28:29 +00:00
parent 07c83610a0
commit 39f7d47b84

View File

@ -423,7 +423,7 @@ JS;
*/
public function SiteTreeAsUL() {
$obj = singleton('Folder');
$obj->setMarkingFilter('ClassName', 'Folder');
$obj->setMarkingFilter('ClassName', ClassInfo::subclassesFor('Folder'));
$obj->markPartialTree();
if($p = $this->currentPage()) $obj->markToExpose($p);
@ -453,7 +453,7 @@ JS;
*/
public function getsubtree() {
$obj = DataObject::get_by_id('Folder', $_REQUEST['ID']);
$obj->setMarkingFilter('ClassName', 'Folder');
$obj->setMarkingFilter('ClassName', ClassInfo::subclassesFor('Folder'));
$obj->markPartialTree();
$results = $obj->getChildrenAsUL(