Skip to content

Commit

Permalink
MINOR Using new PjaxResponseNegotiator in CMSMain
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Apr 5, 2012
1 parent 3341a18 commit a6c586a
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions code/controllers/CMSMain.php
Expand Up @@ -591,20 +591,12 @@ public function save($data, $form) {
$record->Title $record->Title
) )
); );

// Reload form, data and actions might have changed
$form = $this->getEditForm($record->ID);
} else { } else {
$this->response->addHeader('X-Status', _t('LeftAndMain.SAVEDUP')); $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() * @uses LeftAndMainExtension->augmentNewSiteTreeItem()
Expand Down Expand Up @@ -742,9 +734,7 @@ public function revert($data, $form) {
) )
); );


$form = $this->getEditForm($record->ID); return $this->getResponseNegotiator()->respond($this->request);

return $form->forTemplate();
} }


/** /**
Expand Down Expand Up @@ -796,10 +786,7 @@ function unpublish($data, $form) {
sprintf(_t('CMSMain.REMOVEDPAGE',"Removed '%s' from the published site"),$record->Title) sprintf(_t('CMSMain.REMOVEDPAGE',"Removed '%s' from the published site"),$record->Title)
); );


// Reload form, data and actions might have changed return $this->getResponseNegotiator()->respond($this->request);
$form = $this->getEditForm($record->ID);

return $form->forTemplate();
} }


/** /**
Expand Down Expand Up @@ -948,10 +935,7 @@ function restore($data, $form) {
) )
); );


// Reload form, data and actions might have changed return $this->getResponseNegotiator()->respond($this->request);
$form = $this->getEditForm($restoredPage->ID);

return $form->forTemplate();
} }


function duplicate($request) { function duplicate($request) {
Expand Down

0 comments on commit a6c586a

Please sign in to comment.