Merge pull request #863 from jellykells/jellykells/owner_view_unapproved

Allow image owner to view their unapproved images
This commit is contained in:
Shish
2022-07-08 22:20:52 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -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];