mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Reapply r42087
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@43181 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4d0c8096cb
commit
b976f99054
@ -535,11 +535,9 @@ JS;
|
||||
if (isset($urlParams['publish']) && $urlParams['publish'] == 1) {
|
||||
$this->performPublish($record);
|
||||
|
||||
if(substr($SQL_id,0,3) != 'new') {
|
||||
$publishedRecord = DataObject::get_one($className, "`$className`.ID = {$SQL_id}");
|
||||
} else {
|
||||
$publishedRecord = $this->getNewItem($SQL_id, false);
|
||||
}
|
||||
$record->setClassName($record->ClassName);
|
||||
$newClass = $record->ClassName;
|
||||
$publishedRecord = $record->newClassInstance($newClass);
|
||||
|
||||
return $this->tellBrowserAboutPublicationChange($publishedRecord, "Published '$record->Title' successfully");
|
||||
} else {
|
||||
@ -559,6 +557,7 @@ JS;
|
||||
*/
|
||||
public function getActionUpdateJS($record) {
|
||||
// Get the new action buttons
|
||||
|
||||
$tempForm = $this->getEditForm($record->ID);
|
||||
$actionList = '';
|
||||
foreach($tempForm->Actions() as $action) {
|
||||
|
Loading…
Reference in New Issue
Block a user