From: Jean-Philippe Lang Date: Thu, 26 Jun 2008 19:11:07 +0000 (+0000) Subject: Fixed: timelog redirects inappropriately when :back_url is blank (#1524). X-Git-Tag: 0.8.0-RC1~405 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f79f19f84c3b30b47280592a4ab8eb06dafb168f;p=redmine.git Fixed: timelog redirects inappropriately when :back_url is blank (#1524). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1589 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index 2b763129e..2e257c5aa 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -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')