summaryrefslogtreecommitdiffstats
path: root/app/controllers/wiki_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-10 20:09:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-10 20:09:41 +0000
commitef25210aca9278e51f81bd15e85a3143c667ff17 (patch)
tree312d20360571770a231f4fd307c12d0c535d60f2 /app/controllers/wiki_controller.rb
parent2304f5d42c2bb1829b1cf9055c2848db116742d3 (diff)
downloadredmine-ef25210aca9278e51f81bd15e85a3143c667ff17.tar.gz
redmine-ef25210aca9278e51f81bd15e85a3143c667ff17.zip
Merged ajax_upload branch (#3957).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10977 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/wiki_controller.rb')
-rw-r--r--app/controllers/wiki_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index fd7076024..115f61157 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -37,6 +37,7 @@ class WikiController < ApplicationController
before_filter :find_existing_or_new_page, :only => [:show, :edit, :update]
before_filter :find_existing_page, :only => [:rename, :protect, :history, :diff, :annotate, :add_attachment, :destroy, :destroy_version]
accept_api_auth :index, :show, :update, :destroy
+ before_filter :find_attachments, :only => [:preview]
helper :attachments
include AttachmentsHelper
@@ -293,7 +294,7 @@ class WikiController < ApplicationController
# page is nil when previewing a new page
return render_403 unless page.nil? || editable?(page)
if page
- @attachements = page.attachments
+ @attachments += page.attachments
@previewed = page.content
end
@text = params[:content][:text]