summaryrefslogtreecommitdiffstats
path: root/app/controllers/timelog_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-14 18:29:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-14 18:29:24 +0000
commit335f8da5e81e1974baa13e18be579a8007788dfd (patch)
tree235580c5d64f2e922edea3407cf9ab8736e4d6e8 /app/controllers/timelog_controller.rb
parent9ac043a09681bf93ff57155ff38a4400d3391fb0 (diff)
downloadredmine-335f8da5e81e1974baa13e18be579a8007788dfd.tar.gz
redmine-335f8da5e81e1974baa13e18be579a8007788dfd.zip
Fixed: 404 when entering time with blank issue id (#7099).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4511 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r--app/controllers/timelog_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb
index 300b28f11..f75d5833e 100644
--- a/app/controllers/timelog_controller.rb
+++ b/app/controllers/timelog_controller.rb
@@ -200,10 +200,10 @@ private
end
def find_project
- if issue_id = (params[:issue_id] || params[:time_entry] && params[:time_entry][:issue_id])
+ if (issue_id = (params[:issue_id] || params[:time_entry] && params[:time_entry][:issue_id])).present?
@issue = Issue.find(issue_id)
@project = @issue.project
- elsif project_id = (params[:project_id] || params[:time_entry] && params[:time_entry][:project_id])
+ elsif (project_id = (params[:project_id] || params[:time_entry] && params[:time_entry][:project_id])).present?
@project = Project.find(project_id)
else
render_404