BUGFIX prevent calling function on null record

This commit is contained in:
Will Rossiter 2011-10-29 13:57:50 +13:00
parent f634ad09db
commit c34ef60d82
2 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,8 @@ class CMSPageHistoryController extends CMSMain {
$form = $this->ShowVersionForm(
$request->param('VersionID')
);
if($this->isAjax()) {
if($form && $this->isAjax()) {
$content = $form->forTemplate();
} else {
$content = $this->customise(array('EditForm' => $form))->renderWith($this->getViewer('show'));

View File

@ -20,11 +20,10 @@
</div>
</div>
<div class="cms-content-tools west cms-panel" data-expandOnClick="true">
<h3 class="cms-panel-header"><% _t('FILTER', 'Filter') %></h3>
<div class="cms-content-tools west cms-panel cms-panel-layout" data-expandOnClick="true" data-layout="{type: 'border'}">
<div class="cms-panel-content center">
<h3 class="cms-panel-header"><% _t('FILTER', 'Filter') %></h3>
<div class="cms-panel-content">
$SearchForm
</div>
</div>