From f57dc61cb7b5bd863a9c295467161d514e814df6 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 10 Jul 2022 01:40:04 +0100 Subject: [PATCH] only hide images if image approbals are enabled --- ext/comment/main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/comment/main.php b/ext/comment/main.php index c1f2d352..e48c0bab 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -239,7 +239,7 @@ class CommentList extends Extension private function onPageRequest_list(PageRequestEvent $event) { - global $cache, $database, $user; + global $cache, $config, $database, $user; $where = SPEED_HAX ? "WHERE posted > now() - interval '24 hours'" : ""; @@ -279,6 +279,7 @@ class CommentList extends Extension } if ( Extension::is_enabled(ApprovalInfo::KEY) && !is_null($image) && + $config->get_bool(ApprovalConfig::IMAGES) && $image->approved!==true ) { $image = null;