Don't allow gilding of removed comments

This was making it possible to view the author/text of removed comments
on the gilding page.
This commit is contained in:
Chad Birch
2013-04-01 14:31:41 -06:00
parent 00273cdf53
commit cb99c8ca19

View File

@@ -1391,7 +1391,9 @@ class FormsController(RedditController):
if comment:
comment_sr = Subreddit._byID(comment.sr_id, data=True)
if comment._deleted or not comment_sr.allow_comment_gilding:
if (comment._deleted or
comment._spam or
not comment_sr.allow_comment_gilding):
comment = None
start_over = False