diff --git a/includes/community.class.php b/includes/community.class.php index f4359a08..c12e180e 100644 --- a/includes/community.class.php +++ b/includes/community.class.php @@ -95,6 +95,7 @@ class CommunityContent {c.userId = ?d AND} {c.replyTo <> ?d AND} {c.replyTo = ?d AND} + {ur.entry IS ?n AND} ((c.flags & ?d) = 0 OR c.userId = ?d OR ?d) GROUP BY c.id @@ -141,6 +142,7 @@ class CommunityContent empty($params['user']) ? DBSIMPLE_SKIP : $params['user'], empty($params['replies']) ? DBSIMPLE_SKIP : 0, // i dont know, how to switch the sign around !empty($params['replies']) ? DBSIMPLE_SKIP : 0, + empty($params['unrated']) ? DBSIMPLE_SKIP : null, CC_FLAG_DELETED, User::$id, User::isInGroup(U_GROUP_COMMENTS_MODERATOR), diff --git a/pages/utility.php b/pages/utility.php index a571ccde..45bce104 100644 --- a/pages/utility.php +++ b/pages/utility.php @@ -162,9 +162,7 @@ class UtilityPage extends GenericPage break; case 'unrated-comments': - - // EXPLAIN SELECT ac.* FROM aowow_comments ac LEFT JOIN aowow_comments_rates acr ON acr.commentId = ac.id AND acr.userId <> 0 WHERE acr.commentId IS NULL; - if ($_ = CommunityContent::getCommentPreviews(['user' => User::$id, 'replies' => false], $nFound)) + if ($_ = CommunityContent::getCommentPreviews(['unrated' => true], $nFound)) { $tabData = array( 'data' => $_, @@ -181,7 +179,6 @@ class UtilityPage extends GenericPage $this->lvTabs[] = ['commentpreview', $tabData]; } - $this->lvTabs[] = ['commentpreview', ['data' => []]]; break; case 'missing-screenshots':