fixes #1289
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class ForumTopicsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
before_filter :member_only, :except => [:index, :show]
|
||||
before_filter :janitor_only, :only => [:new_merge, :create_merge]
|
||||
before_filter :normalize_search, :only => :index
|
||||
|
||||
def new
|
||||
@@ -68,6 +69,17 @@ class ForumTopicsController < ApplicationController
|
||||
redirect_to forum_topics_path, :notice => "All topics marked as read"
|
||||
end
|
||||
|
||||
def new_merge
|
||||
@forum_topic = ForumTopic.find(params[:id])
|
||||
end
|
||||
|
||||
def create_merge
|
||||
@forum_topic = ForumTopic.find(params[:id])
|
||||
@merged_topic = ForumTopic.find(params[:merged_id])
|
||||
@forum_topic.merge(@merged_topic)
|
||||
redirect_to forum_topic_path(@forum_topic)
|
||||
end
|
||||
|
||||
private
|
||||
def normalize_search
|
||||
if params[:title_matches]
|
||||
|
||||
Reference in New Issue
Block a user