]> source.dussan.org Git - redmine.git/commitdiff
Fixed: timelog redirects inappropriately when :back_url is blank (#1524).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 26 Jun 2008 19:11:07 +0000 (19:11 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 26 Jun 2008 19:11:07 +0000 (19:11 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1589 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/timelog_controller.rb

index 2b763129ed93d4a20d58a7d6b9699272fba75af7..2e257c5aa40b3e5ab5e45e4827978a0f120ffbaf 100644 (file)
@@ -180,7 +180,7 @@ class TimelogController < ApplicationController
     @time_entry.attributes = params[:time_entry]
     if request.post? and @time_entry.save
       flash[:notice] = l(:notice_successful_update)
-      redirect_to(params[:back_url] || {:action => 'details', :project_id => @time_entry.project})
+      redirect_to(params[:back_url].blank? ? {:action => 'details', :project_id => @time_entry.project} : params[:back_url])
       return
     end    
     @activities = Enumeration::get_values('ACTI')