Use named route with attachment filename for inline images.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11189 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2013-01-14 21:03:53 +00:00
1 parent 6ce28450c0
commit 2230c11baa
2 files changed
+10 -11

No files matched your search

+1 -2
View File
@@ -559,8 +559,7 @@ module ApplicationHelper
filename, ext, alt, alttext = $1.downcase, $2, $3, $4
# search for the picture in attachments
if found = Attachment.latest_attach(attachments, filename)
image_url = url_for :only_path => only_path, :controller => 'attachments',
:action => 'download', :id => found
image_url = download_named_attachment_path(found, found.filename, :only_path => only_path)
desc = found.description.to_s.gsub('"', '')
if !desc.blank? && alttext.blank?
alt = " title=\"#{desc}\" alt=\"#{desc}\""