summaryrefslogtreecommitdiffstats
path: root/app/controllers/boards_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-12-24 10:03:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-12-24 10:03:13 +0000
commit5c97a83a705f9dd7b7e8dd4470a2bc12fa5b22c1 (patch)
treedf9ac134224e4c43cdec2bd33d8801885c5d242b /app/controllers/boards_controller.rb
parent7776b5b6659ee213c031fd1ed3f73d503af6541e (diff)
downloadredmine-5c97a83a705f9dd7b7e8dd4470a2bc12fa5b22c1.tar.gz
redmine-5c97a83a705f9dd7b7e8dd4470a2bc12fa5b22c1.zip
Validates sort_key and sort_order params (#2378).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2171 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/boards_controller.rb')
-rw-r--r--app/controllers/boards_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb
index 4532a88fe..c6ce934ee 100644
--- a/app/controllers/boards_controller.rb
+++ b/app/controllers/boards_controller.rb
@@ -35,8 +35,10 @@ class BoardsController < ApplicationController
end
def show
- sort_init "#{Message.table_name}.updated_on", "desc"
- sort_update
+ sort_init 'updated_on', 'desc'
+ sort_update 'created_on' => "#{Message.table_name}.created_on",
+ 'replies' => "#{Message.table_name}.replies_count",
+ 'updated_on' => "#{Message.table_name}.updated_on"
@topic_count = @board.topics.count
@topic_pages = Paginator.new self, @topic_count, per_page_option, params['page']