diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-03 14:42:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-03 14:42:15 +0000 |
commit | 58a63c49c49bfdde9ad1d5db5157662ca60c2c8e (patch) | |
tree | f1c7c582b688886b9d8c231f0802a32d663826e6 /app/helpers | |
parent | 4ccc7dff14c2ca6912d2ce64c4ab99727c2303e6 (diff) | |
download | redmine-58a63c49c49bfdde9ad1d5db5157662ca60c2c8e.tar.gz redmine-58a63c49c49bfdde9ad1d5db5157662ca60c2c8e.zip |
Fixed that magic links to existing attachments are not converted when previewing issue notes.
git-svn-id: http://svn.redmine.org/redmine/trunk@12476 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fac002565..bb7208e36 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -847,7 +847,8 @@ module ApplicationHelper repo_prefix = nil end when 'attachment' - attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil) + attachments = options[:attachments] || [] + attachments += obj.attachments if obj.respond_to?(:attachments) if attachments && attachment = Attachment.latest_attach(attachments, name) link = link_to_attachment(attachment, :only_path => only_path, :download => true, :class => 'attachment') end |