Skip to content
This repository
Browse code

BUG Redirect to edit view after page revert in CMS (fixes #7391)

  • Loading branch information...
commit e59aec3f6f6c1215d2a83e1e404e0988b69815b9 1 parent cd8c3a0
Ingo Schommer authored August 27, 2012

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  code/controllers/CMSMain.php
4  code/controllers/CMSMain.php
@@ -1061,8 +1061,12 @@ function doRollback($data, $form) {
1061 1061
 		
1062 1062
 		// Can be used in different contexts: In normal page edit view, in which case the redirect won't have any effect.
1063 1063
 		// Or in history view, in which case a revert causes the CMS to re-load the edit view.
  1064
+		// The X-Pjax header forces a "full" content refresh on redirect.
1064 1065
 		$url = Controller::join_links(singleton('CMSPageEditController')->Link('show'), $record->ID);
1065 1066
 		$this->response->addHeader('X-ControllerURL', $url);
  1067
+		$this->request->addHeader('X-Pjax', 'Content');  
  1068
+		$this->response->addHeader('X-Pjax', 'Content');  
  1069
+
1066 1070
 		return $this->getResponseNegotiator()->respond($this->request);
1067 1071
 	}
1068 1072
 

0 notes on commit e59aec3

Please sign in to comment.
Something went wrong with that request. Please try again.