Project

General

Profile

Feature #3306 » patch.diff

Edouard Brière, 2009-05-06 21:24

View differences:

app/controllers/messages_controller.rb
46 46
      @message.sticky = params[:message]['sticky']
47 47
    end
48 48
    if request.post? && @message.save
49
      call_hook(:controller_board_message_new_after_save, { :params => params, :message => @message})
49 50
      attach_files(@message, params[:attachments])
50 51
      redirect_to :action => 'show', :id => @message
51 52
    end
......
58 59
    @reply.board = @board
59 60
    @topic.children << @reply
60 61
    if !@reply.new_record?
62
      call_hook(:controller_board_message_reply_after_save, { :params => params, :message => @reply})
61 63
      attach_files(@reply, params[:attachments])
62 64
    end
63 65
    redirect_to :action => 'show', :id => @topic
app/controllers/wiki_controller.rb
82 82
      @content.author = User.current
83 83
      # if page is new @page.save will also save content, but not if page isn't a new record
84 84
      if (@page.new_record? ? @page.save : @content.save)
85
        call_hook(:controller_wiki_after_save, { :params => params, :page => @page})
85 86
        redirect_to :action => 'index', :id => @project, :page => @page.title
86 87
      end
87 88
    end
    (1-1/1)