diff --git a/ext/approval/main.php b/ext/approval/main.php index 9440c052..a36a21d5 100644 --- a/ext/approval/main.php +++ b/ext/approval/main.php @@ -193,7 +193,7 @@ class Approval extends Extension { global $user, $config; - if ($config->get_bool(ApprovalConfig::IMAGES) && $image->approved===false && !$user->can(Permissions::APPROVE_IMAGE)) { + if ($config->get_bool(ApprovalConfig::IMAGES) && $image->approved===false && !$user->can(Permissions::APPROVE_IMAGE) && $user->id!==$image->owner_id) { return false; } return true; diff --git a/ext/comment/main.php b/ext/comment/main.php index 88d039d8..c1f2d352 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -277,6 +277,12 @@ class CommentList extends Extension ) { $image = null; // this is "clever", I may live to regret it } + if ( + Extension::is_enabled(ApprovalInfo::KEY) && !is_null($image) && + $image->approved!==true + ) { + $image = null; + } if (!is_null($image)) { $comments = $this->get_comments($image->id); $images[] = [$image, $comments];