Made small var name and formatting tweaks

This commit is contained in:
Dan Brown 2017-12-07 19:19:25 +00:00
parent a5e49f642b
commit b65abd25e0
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -163,8 +163,8 @@ class PageController extends Controller
$pageNav = $this->entityRepo->getPageNav($page->html);
// check if the comment's are enabled
$areCommentsEnabled = !setting('app-disable-comments');
if ($areCommentsEnabled) {
$commentsEnabled = !setting('app-disable-comments');
if ($commentsEnabled) {
$page->load(['comments.createdBy']);
}
@ -172,9 +172,11 @@ class PageController extends Controller
$this->setPageTitle($page->getShortName());
return view('pages/show', [
'page' => $page,'book' => $page->book,
'current' => $page, 'sidebarTree' => $sidebarTree,
'commentsEnabled' => $areCommentsEnabled,
'pageNav' => $pageNav]);
'current' => $page,
'sidebarTree' => $sidebarTree,
'commentsEnabled' => $commentsEnabled,
'pageNav' => $pageNav
]);
}
/**