diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 253e1d28d..2b44d51de 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -86,7 +86,7 @@ class ForumsController < ApplicationController order(sort_clause). preload(:author, {:last_reply => :author}). all - + @memos flash.now[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" # back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id) format.html { render action: :show, layout: 'base_forums' }#, error: "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" } @@ -122,14 +122,14 @@ class ForumsController < ApplicationController @topic_count = @forum.topics.count @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] @memos = @forum.topics. - reorder("#{Memo.table_name}.sticky DESC"). + # reorder("#{Memo.table_name}.sticky DESC"). includes(:last_reply). limit(@topic_pages.per_page). offset(@topic_pages.offset). order(sort_clause). preload(:author, {:last_reply => :author}). all - + @memos # @offset, @limit = api_offset_and_limit({:limit => 10}) # @forum = Forum.find(params[:id]) # @memos_all = @forum.topics