mirror of
https://github.com/redmine/redmine.git
synced 2025-12-23 17:00:29 +01:00
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
This commit is contained in:
@@ -200,8 +200,12 @@ class ProjectsController < ApplicationController
|
||||
end
|
||||
|
||||
def list_files
|
||||
sort_init "#{Attachment.table_name}.filename", "asc"
|
||||
sort_update
|
||||
sort_init 'filename', 'asc'
|
||||
sort_update 'filename' => "#{Attachment.table_name}.filename",
|
||||
'created_on' => "#{Attachment.table_name}.created_on",
|
||||
'size' => "#{Attachment.table_name}.filesize",
|
||||
'downloads' => "#{Attachment.table_name}.downloads"
|
||||
|
||||
@containers = [ Project.find(@project.id, :include => :attachments, :order => sort_clause)]
|
||||
@containers += @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
|
||||
render :layout => !request.xhr?
|
||||
|
||||
Reference in New Issue
Block a user