fixes #2531: Topic merge should update updater_id
This commit is contained in:
@@ -149,8 +149,8 @@ class ForumTopic < ActiveRecord::Base
|
||||
|
||||
def merge(topic)
|
||||
ForumPost.where(:id => self.posts.map(&:id)).update_all(:topic_id => topic.id)
|
||||
topic.update_attribute(:response_count, topic.response_count + self.posts.length)
|
||||
self.update_columns(:response_count => 0, :is_deleted => true)
|
||||
topic.update_attributes(:response_count => topic.response_count + self.posts.length, :updater_id => CurrentUser.id)
|
||||
self.update_columns(:response_count => 0, :is_deleted => true, :updater_id => CurrentUser.id)
|
||||
end
|
||||
|
||||
def delete!
|
||||
|
||||
Reference in New Issue
Block a user