BUGFIX Fixed loading of full page template via ajax in CMSPageHistoryController, which causes infinite loops in CMS initialization

This commit is contained in:
Ingo Schommer 2011-10-29 20:45:37 +02:00
parent d66a47271d
commit c5323547b8

View File

@ -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'));
} }