return only publicely visible comments on /count

A regression introduced by 5ce48de.
This commit is contained in:
Martin Zimmermann 2014-03-25 19:01:07 +01:00
parent 1e2efb24b3
commit 78b34ecdd2

View File

@ -182,7 +182,7 @@ class Comments:
threads = dict(self.db.execute([ threads = dict(self.db.execute([
'SELECT threads.uri, COUNT(comments.id) FROM comments', 'SELECT threads.uri, COUNT(comments.id) FROM comments',
'LEFT OUTER JOIN threads ON threads.id = tid', 'LEFT OUTER JOIN threads ON threads.id = tid AND comments.mode = 1',
'GROUP BY threads.uri' 'GROUP BY threads.uri'
]).fetchall()) ]).fetchall())