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
This commit is contained in:
Jean-Philippe Lang
2010-12-14 18:29:24 +00:00
parent 9ac043a096
commit 335f8da5e8
2 changed files with 22 additions and 2 deletions
+2 -2
View File
@@ -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