Remove the ability for mods to approve a deleted link. This prevents the deleted

then approved link from becoming visible.
This commit is contained in:
Brian Simpson
2011-07-17 09:48:04 -07:00
parent 165c3d12d6
commit f8c21e4f7d
2 changed files with 2 additions and 1 deletions

View File

@@ -1400,6 +1400,7 @@ class ApiController(RedditController):
thing = VByName('id'))
def POST_approve(self, why, thing):
if not thing: return
if thing._deleted: return
end_trial(thing, why + "-approved")
admintools.unspam(thing, c.user.name)

View File

@@ -39,7 +39,7 @@ class PrintableButtons(Styled):
(thing.reveal_trial_info and not thing.show_spam))
approval_checkmark = getattr(thing, "approval_checkmark", None)
show_approve = (thing.show_spam or show_ignore or
(is_link and approval_checkmark is None))
(is_link and approval_checkmark is None)) and not thing._deleted
Styled.__init__(self, style = style,
thing = thing,