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
*/
function show($request) {
$form = $this->ShowVersionForm(
$request->param('VersionID')
);
$form = $this->ShowVersionForm($request->param('VersionID'));
if($form && $this->isAjax()) {
$content = $form->forTemplate();
if($this->isAjax()) {
if($form) $content = $form->forTemplate();
else $content = $this->renderWith($this->getTemplatesWithSuffix('_Content'));
} else {
$content = $this->customise(array('EditForm' => $form))->renderWith($this->getViewer('show'));
}