Skip to content

Commit

Permalink
BUGFIX prevent calling function on null record
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Oct 29, 2011
1 parent f634ad0 commit c34ef60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion code/controllers/CMSPageHistoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ function show($request) {
$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'));
Expand Down
7 changes: 3 additions & 4 deletions templates/Includes/CMSPagesController_Content.ss
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit c34ef60

Please sign in to comment.