mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUG Redirect to edit view after page revert in CMS (fixes #7391)
This commit is contained in:
parent
cd8c3a0245
commit
e59aec3f6f
@ -1061,8 +1061,12 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
|
||||
// Can be used in different contexts: In normal page edit view, in which case the redirect won't have any effect.
|
||||
// Or in history view, in which case a revert causes the CMS to re-load the edit view.
|
||||
// The X-Pjax header forces a "full" content refresh on redirect.
|
||||
$url = Controller::join_links(singleton('CMSPageEditController')->Link('show'), $record->ID);
|
||||
$this->response->addHeader('X-ControllerURL', $url);
|
||||
$this->request->addHeader('X-Pjax', 'Content');
|
||||
$this->response->addHeader('X-Pjax', 'Content');
|
||||
|
||||
return $this->getResponseNegotiator()->respond($this->request);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user