diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-28 09:43:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-28 09:43:13 +0000 |
commit | c174540a0e39a4d785d9b99535176b0c92cd1958 (patch) | |
tree | 46d23c12eb3a519a0be6498bea6e945c7f8b326f /app/controllers/wiki_controller.rb | |
parent | 02cc0efdd7b9d10e12a9a335befdab4d4458d4a3 (diff) | |
download | redmine-c174540a0e39a4d785d9b99535176b0c92cd1958.tar.gz redmine-c174540a0e39a4d785d9b99535176b0c92cd1958.zip |
Adds attachments upload on wiki edit form (#1223).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3500 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/wiki_controller.rb')
-rw-r--r-- | app/controllers/wiki_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 97e1531c0..fb472636b 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -76,6 +76,7 @@ class WikiController < ApplicationController @content.version = @page.content.version else if !@page.new_record? && @content.text == params[:content][:text] + attach_files(@page, params[:attachments]) # don't save if text wasn't changed redirect_to :action => 'index', :id => @project, :page => @page.title return @@ -86,6 +87,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) + attach_files(@page, params[:attachments]) call_hook(:controller_wiki_edit_after_save, { :params => params, :page => @page}) redirect_to :action => 'index', :id => @project, :page => @page.title end |