Method: ForumController#move_thread

Defined in:
app/controllers/forum_controller.rb

#move_threadObject



44
45
46
47
48
49
50
51
52
53
54
55
# File 'app/controllers/forum_controller.rb', line 44

def move_thread
  thread = TopicThread.find_sys_id(_sid, params[:thread_id])
  topic = Topic.find_sys_id(_sid, params[:topic_id])
  if topic && thread
    thread.topic_id = params[:topic_id]
    thread.moderation_comment += "Thread moved to #{topic.name} by #{current_user.email} at #{Time.now}<br/>"
    thread.save
    Activity.add(_sid, "Moved #{link_to('thread',thread.link)} to topic '#{topic.name}'", current_user, 'Forums')    
  end

  redirect_to thread.link
end