fix story hiding when downvoted; don't count comment votes

This commit is contained in:
joshua stein 2012-08-29 08:47:52 -05:00
parent 29c6bdec47
commit d6255916e8

View file

@ -79,7 +79,7 @@ private
if user && !newest
# exclude downvoted items
conds[0] << "AND stories.id NOT IN (SELECT story_id FROM votes " <<
"WHERE user_id = ? AND vote < 0) "
"WHERE user_id = ? AND vote < 0 AND comment_id IS NULL) "
conds.push user.id
end