diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-09-13 11:46:39 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-09-13 11:46:39 +0000 |
commit | 94488269d1c3e117fad4acc9be27af10141a32cf (patch) | |
tree | 9bf7535e985981316233bb72adb39faaa7d656a7 /app/controllers | |
parent | 3d0fbea9fdfdea61eaade8bb11d30c472a7c0e7e (diff) | |
download | redmine-94488269d1c3e117fad4acc9be27af10141a32cf.tar.gz redmine-94488269d1c3e117fad4acc9be27af10141a32cf.zip |
Merged r2768, r2773, r2774, r2775, r2796 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2882 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/messages_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/timelog_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/wiki_controller.rb | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index af39efb21..ae11fd2e0 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -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 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 diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 2dcc6f971..2828941ee 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -82,6 +82,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 |