mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 23:39:11 -05:00
Dismiss action on items that are spam.
This commit is contained in:
@@ -1436,8 +1436,10 @@ class ApiController(RedditController):
|
||||
end_trial(thing, why + "-removed")
|
||||
|
||||
kw = {'target': thing}
|
||||
if thing._spam and spam:
|
||||
kw['details'] = 'confirm_spam'
|
||||
if thing._spam:
|
||||
kw['details'] = 'dismiss'
|
||||
elif not spam:
|
||||
kw['details'] = 'not_spam'
|
||||
|
||||
admintools.spam(thing, auto=False,
|
||||
moderator_banned=not c.user_is_admin,
|
||||
@@ -1445,8 +1447,6 @@ class ApiController(RedditController):
|
||||
train_spam=spam)
|
||||
|
||||
if isinstance(thing, (Link, Comment)):
|
||||
if not spam:
|
||||
kw['details'] = 'not_spam'
|
||||
sr = thing.subreddit_slow
|
||||
action = 'remove' + thing.__class__.__name__.lower()
|
||||
ModAction.create(sr, c.user, action, **kw)
|
||||
|
||||
@@ -61,8 +61,9 @@ class ModAction(tdb_cassandra.UuidThing, Printable):
|
||||
_details_text = {# approve comment/link
|
||||
'unspam': _('unspam'),
|
||||
# remove comment/link
|
||||
'confirm_spam': _('confirmed spam'),
|
||||
'confirm_spam': _('confirmed spam'), # vestigal
|
||||
'not_spam': _('not spam'),
|
||||
'dismiss': _('dismissed'),
|
||||
# removemoderator
|
||||
'remove_self': _('removed self'),
|
||||
# editsettings
|
||||
|
||||
@@ -119,11 +119,12 @@
|
||||
|
||||
<%def name="big_modbuttons(thing, kind)">
|
||||
<span class="big-mod-buttons">
|
||||
<% remove_text = _('removed') %>
|
||||
%if getattr(thing, "moderator_banned", None):
|
||||
<!-- pass -->
|
||||
%elif thing._spam:
|
||||
${pretty_button(_("confirm %(obj)s removal") % dict(obj=kind),
|
||||
"big_mod_action", -1, "negative")}
|
||||
${pretty_button(_("dismiss"), "big_mod_action", -1, "neutral")}
|
||||
<% remove_text = _('dismissed') %>
|
||||
%else:
|
||||
${pretty_button(_("spam %(obj)s") % dict(obj=kind),
|
||||
"big_mod_action", -2, "negative")}
|
||||
@@ -144,7 +145,7 @@
|
||||
${_("spammed")}
|
||||
</span>
|
||||
<span class="status-msg removed">
|
||||
${_("removed")}
|
||||
${remove_text}
|
||||
</span>
|
||||
<span class="status-msg approved">
|
||||
${_("approved")}
|
||||
|
||||
Reference in New Issue
Block a user