]> source.dussan.org Git - redmine.git/commitdiff
Added two new plugin hooks to IssuesController:
authorEric Davis <edavis@littlestreamsoftware.com>
Mon, 12 Jan 2009 04:52:56 +0000 (04:52 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Mon, 12 Jan 2009 04:52:56 +0000 (04:52 +0000)
* :controller_issues_new_after_save
* :controller_issues_edit_after_save

  #2475

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2261 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index d6c867e39b8efa93d9239b07c1da0f7c1467d0d4..a2b659f9041f18c8039155a447e47f067fd66038 100644 (file)
@@ -147,6 +147,7 @@ class IssuesController < ApplicationController
         attach_files(@issue, params[:attachments])
         flash[:notice] = l(:notice_successful_create)
         Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added')
+        call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
         redirect_to :controller => 'issues', :action => 'show', :id => @issue
         return
       end              
@@ -193,6 +194,7 @@ class IssuesController < ApplicationController
           flash[:notice] = l(:notice_successful_update)
           Mailer.deliver_issue_edit(journal) if Setting.notified_events.include?('issue_updated')
         end
+        call_hook(:controller_issues_edit_after_save, { :params => params, :issue => @issue, :time_entry => @time_entry, :journal => journal})
         redirect_to(params[:back_to] || {:action => 'show', :id => @issue})
       end
     end