summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Users.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-04-03 16:56:59 +0200
committerYorhel <git@yorhel.nl>2011-04-03 16:56:59 +0200
commitbdc8abf02ecff773382932c3ca5a8e21c3ec5901 (patch)
tree4f64985cb6d296cd83341cde51819c99a7ed043d /lib/VNDB/DB/Users.pm
parentc5a937285d8601dad81cb20fb7c17138fa446ef3 (diff)
Bugfix: use the 'vnlists' table to calculate stats on user page
Diffstat (limited to 'lib/VNDB/DB/Users.pm')
-rw-r--r--lib/VNDB/DB/Users.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Users.pm b/lib/VNDB/DB/Users.pm
index 36ae02af..17f360cc 100644
--- a/lib/VNDB/DB/Users.pm
+++ b/lib/VNDB/DB/Users.pm
@@ -63,7 +63,7 @@ sub dbUserGet {
'(SELECT COUNT(*) FROM notifications WHERE uid = u.id AND read IS NULL) AS notifycount' : (),
$o{what} =~ /stats/ ? (
'(SELECT COUNT(*) FROM rlists WHERE uid = u.id) AS releasecount',
- '(SELECT COUNT(DISTINCT rv.vid) FROM rlists rl JOIN releases r ON rl.rid = r.id JOIN releases_vn rv ON rv.rid = r.latest WHERE uid = u.id) AS vncount',
+ '(SELECT COUNT(*) FROM vnlists WHERE uid = u.id) AS vncount',
'(SELECT COUNT(*) FROM threads_posts WHERE uid = u.id) AS postcount',
'(SELECT COUNT(*) FROM threads_posts WHERE uid = u.id AND num = 1) AS threadcount',
'(SELECT COUNT(DISTINCT tag) FROM tags_vn WHERE uid = u.id) AS tagcount',