Merge pull request #3127 from riking/self-delete-locale

FIX: 🈂️ Use site-wide locale for deletion stubs
This commit is contained in:
Robin Ward 2015-01-26 11:04:04 -05:00
commit ab4eb353af
1 changed files with 7 additions and 5 deletions

View File

@ -97,6 +97,7 @@ class PostDestroyer
# When a user 'deletes' their own post. We just change the text.
def mark_for_deletion
I18n.with_locale(SiteSetting.default_locale) do
Post.transaction do
@post.revise(@user, { raw: I18n.t('js.post.deleted_by_author', count: SiteSetting.delete_removed_posts_after) }, force_new_version: true)
@post.update_column(:user_deleted, true)
@ -104,6 +105,7 @@ class PostDestroyer
@post.topic_links.each(&:destroy)
end
end
end
def user_recovered
Post.transaction do