Removes "xxx and return" calls (#4446).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3185 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-12-18 14:22:18 +00:00
parent 0e4525d76c
commit 488c192286
10 changed files with 34 additions and 26 deletions
+3 -3
View File
@@ -209,7 +209,7 @@ class TimelogController < ApplicationController
end
def edit
render_403 and return if @time_entry && !@time_entry.editable_by?(User.current)
(render_403; return) if @time_entry && !@time_entry.editable_by?(User.current)
@time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => User.current.today)
@time_entry.attributes = params[:time_entry]
@@ -223,8 +223,8 @@ class TimelogController < ApplicationController
end
def destroy
render_404 and return unless @time_entry
render_403 and return unless @time_entry.editable_by?(User.current)
(render_404; return) unless @time_entry
(render_403; return) unless @time_entry.editable_by?(User.current)
@time_entry.destroy
flash[:notice] = l(:notice_successful_delete)
redirect_to :back