Permalink
Browse files

moved the insert for DuplicateAction

  • Loading branch information...
1 parent 760875a commit ed73c49e518a10d7322b356cc15b6bb1b2c0da3a @codivist committed Feb 7, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 code/DataObjects/DataObjectAsPage.php
@@ -104,6 +104,8 @@ public function getCMSActions()
//Create the Duplicate action
$DuplicateAction = FormAction::create('duplicate', 'Duplicate Object');
$DuplicateAction->describe("Duplicate this item");
+ //add it to the existing actions
+ $Actions->insertFirst($DuplicateAction);
if($this->Status != 'Draft')
{
@@ -114,8 +116,7 @@ public function getCMSActions()
$Actions->insertFirst($unPublishAction);
}
- //add it to the existing actions
- $Actions->insertFirst($DuplicateAction);
+
return $Actions;
}

0 comments on commit ed73c49

Please sign in to comment.