Browse files

Bug in rated posts counting

  • Loading branch information...
1 parent 75d10a0 commit 1ebede32c2b0483d120de16cfca25cee62165756 martin committed Aug 6, 2002
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/forum/lib.php
View
4 mod/forum/lib.php
@@ -325,7 +325,9 @@ function forum_count_unrated_posts($discussionid, $userid) {
if ($rated = get_record_sql("SELECT count(*) as num
FROM forum_posts p, forum_ratings r
- WHERE p.id = r.post AND r.user = '$userid'")) {
+ WHERE p.discussion = '$discussionid'
+ AND p.id = r.post
+ AND r.user = '$userid'")) {
$difference = $posts->num - $rated->num;
if ($difference > 0) {
return $difference;

0 comments on commit 1ebede3

Please sign in to comment.