Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Using new PjaxResponseNegotiator in CMSMain

  • Loading branch information...
commit a6c586ae203fd0ca01c2c81b8966e01ab2235fd7 1 parent 3341a18
Ingo Schommer chillu authored
Showing with 5 additions and 21 deletions.
  1. +5 −21 code/controllers/CMSMain.php
26 code/controllers/CMSMain.php
View
@@ -591,20 +591,12 @@ public function save($data, $form) {
$record->Title
)
);
-
- // Reload form, data and actions might have changed
- $form = $this->getEditForm($record->ID);
} else {
$this->response->addHeader('X-Status', _t('LeftAndMain.SAVEDUP'));
-
- // Reload form, data and actions might have changed
- $form = $this->getEditForm($record->ID);
}
-
- return $form->forTemplate();
- }
-
+ return $this->getResponseNegotiator()->respond($this->request);
+ }
/**
* @uses LeftAndMainExtension->augmentNewSiteTreeItem()
@@ -742,9 +734,7 @@ public function revert($data, $form) {
)
);
- $form = $this->getEditForm($record->ID);
-
- return $form->forTemplate();
+ return $this->getResponseNegotiator()->respond($this->request);
}
/**
@@ -796,10 +786,7 @@ function unpublish($data, $form) {
sprintf(_t('CMSMain.REMOVEDPAGE',"Removed '%s' from the published site"),$record->Title)
);
- // Reload form, data and actions might have changed
- $form = $this->getEditForm($record->ID);
-
- return $form->forTemplate();
+ return $this->getResponseNegotiator()->respond($this->request);
}
/**
@@ -948,10 +935,7 @@ function restore($data, $form) {
)
);
- // Reload form, data and actions might have changed
- $form = $this->getEditForm($restoredPage->ID);
-
- return $form->forTemplate();
+ return $this->getResponseNegotiator()->respond($this->request);
}
function duplicate($request) {
Please sign in to comment.
Something went wrong with that request. Please try again.