diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2009-05-30 22:49:39 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2009-05-30 22:49:39 +0000 |
commit | 211b13c9ec4de19556a9df42c40c6cb0bd10c3ee (patch) | |
tree | d11202c39d3eb1e2999711d204054fd0dfdd8d51 /app/controllers/timelog_controller.rb | |
parent | 4ba83085072d69451149896002958c6ab479b0c8 (diff) | |
download | redmine-211b13c9ec4de19556a9df42c40c6cb0bd10c3ee.tar.gz redmine-211b13c9ec4de19556a9df42c40c6cb0bd10c3ee.zip |
Added plugin hook, :controller_timelog_edit_before_save. (#3341)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2775 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r-- | app/controllers/timelog_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index 58df1f5bc..60cc3916b 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -197,6 +197,9 @@ class TimelogController < ApplicationController render_403 and return if @time_entry && !@time_entry.editable_by?(User.current) @time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => Date.today) @time_entry.attributes = params[:time_entry] + + call_hook(:controller_timelog_edit_before_save, { :params => params, :time_entry => @time_entry }) + if request.post? and @time_entry.save flash[:notice] = l(:notice_successful_update) redirect_back_or_default :action => 'details', :project_id => @time_entry.project |