mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Fixed SS_HTTPResponse references in CMSBatchActionHandler (from r98285)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@106105 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8449c0420c
commit
a3940b4e50
@ -566,10 +566,10 @@ JS;
|
||||
* @uses SiteTree->doRevertToLive()
|
||||
*/
|
||||
public function revert($data, $form) {
|
||||
if(!isset($data['ID'])) return new HTTPResponse("Please pass an ID in the form content", 400);
|
||||
if(!isset($data['ID'])) return new SS_HTTPResponse("Please pass an ID in the form content", 400);
|
||||
|
||||
$restoredPage = Versioned::get_latest_version("SiteTree", $data['ID']);
|
||||
if(!$restoredPage) return new HTTPResponse("SiteTree #$id not found", 400);
|
||||
if(!$restoredPage) return new SS_HTTPResponse("SiteTree #$id not found", 400);
|
||||
|
||||
$record = Versioned::get_one_by_stage(
|
||||
'SiteTree',
|
||||
@ -1187,12 +1187,12 @@ JS;
|
||||
*/
|
||||
function restore($data, $form) {
|
||||
if(!isset($data['ID']) || !is_numeric($data['ID'])) {
|
||||
return new HTTPResponse("Please pass an ID in the form content", 400);
|
||||
return new SS_HTTPResponse("Please pass an ID in the form content", 400);
|
||||
}
|
||||
|
||||
$id = (int)$data['ID'];
|
||||
$restoredPage = Versioned::get_latest_version("SiteTree", $id);
|
||||
if(!$restoredPage) return new HTTPResponse("SiteTree #$id not found", 400);
|
||||
if(!$restoredPage) return new SS_HTTPResponse("SiteTree #$id not found", 400);
|
||||
|
||||
$restoredPage = $restoredPage->doRestoreToStage();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user