mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Fixed loading of full page template via ajax in CMSPageHistoryController, which causes infinite loops in CMS initialization
This commit is contained in:
parent
d66a47271d
commit
c5323547b8
@ -24,12 +24,11 @@ class CMSPageHistoryController extends CMSMain {
|
|||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function show($request) {
|
function show($request) {
|
||||||
$form = $this->ShowVersionForm(
|
$form = $this->ShowVersionForm($request->param('VersionID'));
|
||||||
$request->param('VersionID')
|
|
||||||
);
|
|
||||||
|
|
||||||
if($form && $this->isAjax()) {
|
if($this->isAjax()) {
|
||||||
$content = $form->forTemplate();
|
if($form) $content = $form->forTemplate();
|
||||||
|
else $content = $this->renderWith($this->getTemplatesWithSuffix('_Content'));
|
||||||
} else {
|
} else {
|
||||||
$content = $this->customise(array('EditForm' => $form))->renderWith($this->getViewer('show'));
|
$content = $this->customise(array('EditForm' => $form))->renderWith($this->getViewer('show'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user