BUGFIX Fixed SiteTree->getCMSActions() not extending properly because it was passing an array to the extend() 2nd argument, which expected a FieldSet object

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66632 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-11-25 08:24:39 +00:00 committed by Sam Minnee
parent 8b57dc223d
commit 4713842790

View File

@ -1296,8 +1296,13 @@ class SiteTree extends DataObject {
$actions[] = new FormAction('publish', _t('SiteTree.BUTTONSAVEPUBLISH', 'Save and Publish'));
}
$actionsFieldset = new FieldSet();
if($actions) foreach($actions as $action) {
$actionsFieldset->push($action);
}
// getCMSActions() can be extended with updateCmsActions() on a decorator
$this->extend('updateCMSActions', $actions);
$this->extend('updateCMSActions', $actionsFieldset);
return new DataObjectSet($actions);
}