From 018e1531973b0137360755663c57cc1912f806a7 Mon Sep 17 00:00:00 2001 From: Normann Lou Date: Fri, 21 Nov 2008 06:12:06 +0000 Subject: [PATCH] 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 --- code/ModelAdmin.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/ModelAdmin.php b/code/ModelAdmin.php index 2ba3bd3f..c2d6dce2 100644 --- a/code/ModelAdmin.php +++ b/code/ModelAdmin.php @@ -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')));