fixes #1815
This commit is contained in:
@@ -13,7 +13,7 @@ module Moderator
|
|||||||
@post = ::Post.find(params[:id])
|
@post = ::Post.find(params[:id])
|
||||||
if params[:commit] == "Delete"
|
if params[:commit] == "Delete"
|
||||||
@post.flag!(params[:reason])
|
@post.flag!(params[:reason])
|
||||||
@post.delete!
|
@post.delete!(:reason => params[:reason])
|
||||||
end
|
end
|
||||||
redirect_to(post_path(@post))
|
redirect_to(post_path(@post))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -875,7 +875,11 @@ class Post < ActiveRecord::Base
|
|||||||
update_column(:is_banned, true) if options[:ban] || has_tag?("banned_artist")
|
update_column(:is_banned, true) if options[:ban] || has_tag?("banned_artist")
|
||||||
|
|
||||||
unless options[:without_mod_action]
|
unless options[:without_mod_action]
|
||||||
ModAction.create(:description => "deleted post ##{id}")
|
if options[:reason]
|
||||||
|
ModAction.create(:description => "deleted post ##{id}, reason: #{options[:reason]}")
|
||||||
|
else
|
||||||
|
ModAction.create(:description => "deleted post ##{id}")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user