]> source.dussan.org Git - redmine.git/commitdiff
Added more plugin hooks:
authorEric Davis <edavis@littlestreamsoftware.com>
Sat, 30 May 2009 22:43:01 +0000 (22:43 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sat, 30 May 2009 22:43:01 +0000 (22:43 +0000)
* :controller_messages_new_after_save
* :controller_messages_reply_after_save
* :controller_wiki_edit_after_save

  #3306

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

app/controllers/messages_controller.rb
app/controllers/wiki_controller.rb

index 9a7c34c37ea0d799038260d23ad0ce5820334b95..f328e9b605d95bad631b4449982bb1b7d7ef1070 100644 (file)
@@ -46,6 +46,7 @@ class MessagesController < ApplicationController
       @message.sticky = params[:message]['sticky']
     end
     if request.post? && @message.save
+      call_hook(:controller_messages_new_after_save, { :params => params, :message => @message})
       attach_files(@message, params[:attachments])
       redirect_to :action => 'show', :id => @message
     end
@@ -58,6 +59,7 @@ class MessagesController < ApplicationController
     @reply.board = @board
     @topic.children << @reply
     if !@reply.new_record?
+      call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply})
       attach_files(@reply, params[:attachments])
     end
     redirect_to :action => 'show', :id => @topic
index fd876cf049b91ef9a3561e4483b06af33d0ad609..b000b0596f02f1e85e6990864dda27a51fba2b72 100644 (file)
@@ -83,6 +83,7 @@ class WikiController < ApplicationController
       @content.author = User.current
       # if page is new @page.save will also save content, but not if page isn't a new record
       if (@page.new_record? ? @page.save : @content.save)
+        call_hook(:controller_wiki_edit_after_save, { :params => params, :page => @page})
         redirect_to :action => 'index', :id => @project, :page => @page.title
       end
     end