mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
flagging workflow changes per http://meta.discourse.org/t/we-need-an-archive-flag-notification-button/7450
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
class Admin::FlagsController < Admin::AdminController
|
||||
def index
|
||||
|
||||
# we may get out of sync, fix it here
|
||||
PostAction.update_flagged_posts_count
|
||||
posts, users = PostAction.flagged_posts_report(params[:filter])
|
||||
@ -12,11 +11,24 @@ class Admin::FlagsController < Admin::AdminController
|
||||
end
|
||||
end
|
||||
|
||||
def clear
|
||||
def disagree
|
||||
p = Post.find(params[:id])
|
||||
PostAction.clear_flags!(p, current_user.id)
|
||||
p.reload
|
||||
p.unhide!
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
def agree
|
||||
p = Post.find(params[:id])
|
||||
PostAction.defer_flags!(p, current_user.id)
|
||||
PostAction.hide_post!(p)
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
def defer
|
||||
p = Post.find(params[:id])
|
||||
PostAction.defer_flags!(p, current_user.id)
|
||||
render nothing: true
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user