From c5323547b85355bde9558927355eac04b24a7765 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 29 Oct 2011 20:45:37 +0200 Subject: [PATCH] BUGFIX Fixed loading of full page template via ajax in CMSPageHistoryController, which causes infinite loops in CMS initialization --- code/controllers/CMSPageHistoryController.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/controllers/CMSPageHistoryController.php b/code/controllers/CMSPageHistoryController.php index e766e9f8..137765af 100644 --- a/code/controllers/CMSPageHistoryController.php +++ b/code/controllers/CMSPageHistoryController.php @@ -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')); }