APICHANG: if a DataObject has getCMSActions, its model admin should be able to add them.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66392 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Normann Lou 2008-11-21 06:12:06 +00:00 committed by Sam Minnee
parent 0b1392a688
commit 018e153197

View File

@ -719,9 +719,8 @@ class ModelAdmin_RecordController extends Controller {
$validator = ($this->currentRecord->hasMethod('getCMSValidator')) ? $this->currentRecord->getCMSValidator() : null;
$actions = new FieldSet(
new FormAction("doSave", _t('ModelAdmin.SAVE', "Save"))
);
$actions = $this->currentRecord->getCMSActions();
$actions->push(new FormAction("doSave", _t('ModelAdmin.SAVE', "Save")));
if($this->currentRecord->canDelete(Member::currentUser())) {
$actions->insertFirst($deleteAction = new FormAction('doDelete', _t('ModelAdmin.DELETE', 'Delete')));