summaryrefslogtreecommitdiff
path: root/lib/Multi
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-11-14 18:51:33 +0100
committerYorhel <git@yorhel.nl>2009-11-14 18:53:43 +0100
commit2c6f62c89c93dbb5ec757c11f2af38534f2c760a (patch)
tree6fb761d24851af32cedf5749d9f3401f37f1c043 /lib/Multi
parent151a8338c931389c6d67389c56c2d8862e882de6 (diff)
SQL: Don't count users with ign_votes in bayesian rating
They still have influence on the average number of votes per VN and the overall average vote, but this isn't significant. (at least, not at the moment)
Diffstat (limited to 'lib/Multi')
-rw-r--r--lib/Multi/Maintenance.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Multi/Maintenance.pm b/lib/Multi/Maintenance.pm
index 422b5970..836f24ee 100644
--- a/lib/Multi/Maintenance.pm
+++ b/lib/Multi/Maintenance.pm
@@ -124,9 +124,9 @@ sub vnrating {
c_rating = (SELECT (
((SELECT COUNT(vote)::real/COUNT(DISTINCT vid)::real FROM votes)*(SELECT AVG(vote)::real FROM votes) + SUM(vote)::real) /
((SELECT COUNT(vote)::real/COUNT(DISTINCT vid)::real FROM votes) + COUNT(uid)::real)
- ) FROM votes WHERE vid = id
+ ) FROM votes WHERE vid = id AND uid NOT IN(SELECT id FROM users WHERE ign_votes)
),
- c_votecount = COALESCE((SELECT count(*) FROM votes WHERE vid = id), 0)
+ c_votecount = COALESCE((SELECT count(*) FROM votes WHERE vid = id AND uid NOT IN(SELECT id FROM users WHERE ign_votes)), 0)
|, undef, 'log_stats', 'vnrating');
}