]> source.dussan.org Git - redmine.git/commitdiff
Added plugin hook, :controller_timelog_edit_before_save. (#3341)
authorEric Davis <edavis@littlestreamsoftware.com>
Sat, 30 May 2009 22:49:39 +0000 (22:49 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sat, 30 May 2009 22:49:39 +0000 (22:49 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2775 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/timelog_controller.rb

index 58df1f5bcf83f45dd8197d838977a86bd954ab98..60cc3916bc2514a5d315226e53e51194fd46c193 100644 (file)
@@ -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