Project

General

Profile

Feature #3306 » patch.diff

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

View differences:

app/controllers/messages_controller.rb
@message.sticky = params[:message]['sticky']
end
if request.post? && @message.save
call_hook(:controller_board_message_new_after_save, { :params => params, :message => @message})
attach_files(@message, params[:attachments])
redirect_to :action => 'show', :id => @message
end
......
@reply.board = @board
@topic.children << @reply
if !@reply.new_record?
call_hook(:controller_board_message_reply_after_save, { :params => params, :message => @reply})
attach_files(@reply, params[:attachments])
end
redirect_to :action => 'show', :id => @topic
app/controllers/wiki_controller.rb
@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_after_save, { :params => params, :page => @page})
redirect_to :action => 'index', :id => @project, :page => @page.title
end
end
    (1-1/1)