1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00

Minor update to CommentArray

This commit is contained in:
Ryan Cramer
2022-07-16 15:03:42 -04:00
parent 25c110818e
commit fe9417dcfc

View File

@@ -260,7 +260,9 @@ class CommentArray extends PaginatedArray implements WirePaginatable {
$count = 0;
$stars = false;
foreach($this as $comment) {
/** @var Comment $comment */
if(!$comment->stars) continue;
if($comment->status < Comment::statusApproved) continue;
$total += $comment->stars;
$count++;
}