Project

General

Profile

Patch #3341 ยป controller_timelog_edit_before_save.diff

Shaun Gilroy, 2009-05-12 00:40

View differences:

app/controllers/timelog_controller.rb
197 197
    render_403 and return if @time_entry && !@time_entry.editable_by?(User.current)
198 198
    @time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => Date.today)
199 199
    @time_entry.attributes = params[:time_entry]
200
    
201
    call_hook(:controller_timelog_edit_before_save, { :params => params, :time_entry => @time_entry })
202
    
200 203
    if request.post? and @time_entry.save
201 204
      flash[:notice] = l(:notice_successful_update)
202 205
      redirect_back_or_default :action => 'details', :project_id => @time_entry.project
    (1-1/1)