Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed duplciate success status feedback on CMS save/publish

We now have the CMS actions with two states for communicating
that they've saved correctly.
  • Loading branch information...
commit 1d470fe718ddf51fa53979532c578e7e8c70ad0a 1 parent 26cc14a
@chillu chillu authored
Showing with 1 addition and 19 deletions.
  1. +1 −19 code/controllers/CMSMain.php
View
20 code/controllers/CMSMain.php
@@ -857,25 +857,7 @@ public function save($data, $form) {
// If the 'Save & Publish' button was clicked, also publish the page
if (isset($data['publish']) && $data['publish'] == 1) {
$record->doPublish();
-
- // Update classname with original and get new instance (see above for explanation)
- if(isset($data['ClassName'])) {
- $record->setClassName($data['ClassName']);
- $publishedRecord = $record->newClassInstance($record->ClassName);
- }
-
- $this->response->addHeader(
- 'X-Status',
- rawurlencode(_t(
- 'LeftAndMain.STATUSPUBLISHEDSUCCESS',
- "Published '{title}' successfully",
- 'Status message after publishing a page, showing the page title',
- array('title' => $record->Title)
- ))
- );
- } else {
- $this->response->addHeader('X-Status', rawurlencode(_t('LeftAndMain.SAVEDUP', 'Saved.')));
- }
+ }
return $this->getResponseNegotiator()->respond($this->request);
}
Please sign in to comment.
Something went wrong with that request. Please try again.