From 29b3614bcb759214bb1aba77c27ac11c8ef6b15b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 24 Nov 2007 12:25:07 +0000 Subject: Forums enhancements: * messages can now be edited/deleted (explicit permissions need to be given) * topics can be locked so that no reply can be added (only by users allowed to edit messages) * topics can be marked as sticky so that they always appear at the top of the list (only by users allowed to edit messages) git-svn-id: http://redmine.rubyforge.org/svn/trunk@926 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/boards_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/boards_controller.rb') diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 3a8b021a3..200792370 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -41,7 +41,7 @@ class BoardsController < ApplicationController @topic_count = @board.topics.count @topic_pages = Paginator.new self, @topic_count, 25, params['page'] - @topics = @board.topics.find :all, :order => sort_clause, + @topics = @board.topics.find :all, :order => "#{Message.table_name}.sticky DESC, #{sort_clause}", :include => [:author, {:last_reply => :author}], :limit => @topic_pages.items_per_page, :offset => @topic_pages.current.offset -- cgit v1.2.3