From e10e33a92459a34080a0c4aa1156a728f410b0d1 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 6 Dec 2020 16:14:42 +0100 Subject: [PATCH] fix templates --- Controller/BackendController.php | 2 +- Theme/Backend/news-single.tpl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 95a3aa5..9d1cde7 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -135,7 +135,7 @@ final class BackendController extends Controller implements DashboardElementInte ); // allow comments - if (!$article->getComments() !== null + if (!$article->comments !== null && !($this->app->moduleManager->get('Comments') instanceof NullModule) ) { $commentCreateView = new \Modules\Comments\Theme\Backend\Components\Comment\CreateView($this->app->l11nManager, $request, $response); diff --git a/Theme/Backend/news-single.tpl.php b/Theme/Backend/news-single.tpl.php index 40d15ee..bae2c05 100755 --- a/Theme/Backend/news-single.tpl.php +++ b/Theme/Backend/news-single.tpl.php @@ -54,7 +54,7 @@ echo $this->getData('nav')->render(); ?> getComments(); +$commentList = $news->comments; if (!empty($commentList) && $commentList->isActive()) : /* @todo: check if user has permission to create a comment here, maybe he is only allowed to read comments */ echo $this->getData('commentCreate')->render(1);