]> source.dussan.org Git - redmine.git/commitdiff
Fixed: 404 when "Apply" clicked on activity page (#2251).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 1 Dec 2008 17:27:44 +0000 (17:27 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 1 Dec 2008 17:27:44 +0000 (17:27 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2082 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/projects_controller.rb
app/views/projects/activity.rhtml

index 9b33166821deb874d517a917b6c017fc2ce370b1..427165a3df6910a8060fcbb91bb228692248dc6f 100644 (file)
@@ -227,7 +227,7 @@ class ProjectsController < ApplicationController
     @date_to ||= Date.today + 1
     @date_from = @date_to - @days
     @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
-    @author = (params[:user_id] ? User.active.find(params[:user_id]) : nil)
+    @author = (params[:user_id].blank? ? nil : User.active.find(params[:user_id]))
     
     @activity = Redmine::Activity::Fetcher.new(User.current, :project => @project, 
                                                              :with_subprojects => @with_subprojects,
index 784a5ac390cb5a45f1564cca24d552d38bf99d7c..b0e536690896ede533e2234901a8ef3c2de8337e 100644 (file)
@@ -52,7 +52,7 @@
     <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p>
     <%= hidden_field_tag 'with_subprojects', 0 %>
 <% end %>
-<%= hidden_field_tag 'user_id', params[:user_id] %>
+<%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %>
 <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
 <% end %>
 <% end %>