mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 00:37:02 +02:00
Minor update to CommentArray
This commit is contained in:
@@ -260,7 +260,9 @@ class CommentArray extends PaginatedArray implements WirePaginatable {
|
|||||||
$count = 0;
|
$count = 0;
|
||||||
$stars = false;
|
$stars = false;
|
||||||
foreach($this as $comment) {
|
foreach($this as $comment) {
|
||||||
|
/** @var Comment $comment */
|
||||||
if(!$comment->stars) continue;
|
if(!$comment->stars) continue;
|
||||||
|
if($comment->status < Comment::statusApproved) continue;
|
||||||
$total += $comment->stars;
|
$total += $comment->stars;
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user