OSDN Git Service

Fixes Issue sorting in a project, broken by #2317
authorEric Davis <edavis@littlestreamsoftware.com>
Tue, 27 Jan 2009 20:42:19 +0000 (20:42 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Tue, 27 Jan 2009 20:42:19 +0000 (20:42 +0000)
Issues were sorting but the project id wasn't being added so the
IssuesController would return all issues (cross-project).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2324 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/sort_helper.rb

index 85ae815..b0c7250 100644 (file)
@@ -120,6 +120,9 @@ module SortHelper
     # don't reuse params if filters are present
     url_options = params.has_key?(:set_filter) ? sort_options : params.merge(sort_options)
     
+    # Add project_id to url_options
+    url_options = url_options.merge(:project_id => params[:project_id]) if params.has_key?(:project_id)
+    
     link_to_remote(caption,
                   {:update => "content", :url => url_options, :method => :get},
                   {:href => url_for(url_options)}) +