mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
8b57dc223d
commit
4713842790
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user