From 794d0b35fb6b552b76fe536155e8dacaf8328d6c Mon Sep 17 00:00:00 2001 From: mkinski Date: Wed, 8 Aug 2012 21:24:59 +0200 Subject: [PATCH] joining splitted args to avoid redmine core changes --- app/helpers/wiki_external_filter_helper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/helpers/wiki_external_filter_helper.rb b/app/helpers/wiki_external_filter_helper.rb index a96d60a..efe5c9b 100644 --- a/app/helpers/wiki_external_filter_helper.rb +++ b/app/helpers/wiki_external_filter_helper.rb @@ -80,9 +80,13 @@ module WikiExternalFilterHelper def build_forced(text, attachments, info) + # joining splitted args + # not necessary from v2.1.0 + text = text.join(", ") + if info['replace_attachments'] and attachments attachments.each do |att| - text.to_s.gsub!(/#{att.filename.downcase}/i, att.diskfile) + text.gsub!(/#{att.filename.downcase}/i, att.diskfile) end end @@ -90,7 +94,7 @@ module WikiExternalFilterHelper content = [] errors = "" - text = text.first.to_s.gsub("
", "\n") + text = text.gsub("
", "\n") Rails.logger.debug "\n Text #{text} \n" info['outputs'].each do |out|