only hide images if image approbals are enabled

This commit is contained in:
Shish
2022-07-10 01:40:04 +01:00
parent e97198aa10
commit f57dc61cb7

View File

@@ -239,7 +239,7 @@ class CommentList extends Extension
private function onPageRequest_list(PageRequestEvent $event) private function onPageRequest_list(PageRequestEvent $event)
{ {
global $cache, $database, $user; global $cache, $config, $database, $user;
$where = SPEED_HAX ? "WHERE posted > now() - interval '24 hours'" : ""; $where = SPEED_HAX ? "WHERE posted > now() - interval '24 hours'" : "";
@@ -279,6 +279,7 @@ class CommentList extends Extension
} }
if ( if (
Extension::is_enabled(ApprovalInfo::KEY) && !is_null($image) && Extension::is_enabled(ApprovalInfo::KEY) && !is_null($image) &&
$config->get_bool(ApprovalConfig::IMAGES) &&
$image->approved!==true $image->approved!==true
) { ) {
$image = null; $image = null;