Permalink
Browse files

report false positives on bulk OK operation

  • Loading branch information...
1 parent 616e809 commit 0b041b619fbf791c2a205a7a27844241ffaa9bc8 @aross aross committed Feb 27, 2012
Showing with 8 additions and 1 deletion.
  1. +6 −1 app/controllers/admin/comments_controller.rb
  2. +2 −0 app/controllers/comments_controller.rb
@@ -63,9 +63,14 @@ def bulk_operation
end
unless params[:ok].nil? || params[:ok].empty?
+ # mark the spam as false positives
+ comments = Comment.find_all_by_id(params[:ok])
+ comments.each do |c|
+ c.false_positive! if c.is_spam?
+ end
+
Comment.update_all("ok = true", ["id in (?)", params[:ok]])
Comment.update_all("flagged = false", ["id in (?)", params[:ok]])
- Comment.update_all("spam = false", ["id in (?)", params[:ok]])
end
@@ -201,6 +201,8 @@ def censor
elsif params[:commit] == "Spam"
comment.false_negative!
+
+ flash[:notice] = "Comment marked as spam; Defensio notified about false negative."
end
end

0 comments on commit 0b041b6

Please sign in to comment.