summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-18 10:14:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-18 10:14:17 +0000
commitc4484a40c0e9a8a4576845b9ee5adc357dd377c5 (patch)
tree285c20f4f40f05a768fa60f5bd743b4c357fc987 /lib
parent6bdef3ca64f30c391c5433a5a7edfbbdf3c4fa14 (diff)
downloadredmine-c4484a40c0e9a8a4576845b9ee5adc357dd377c5.tar.gz
redmine-c4484a40c0e9a8a4576845b9ee5adc357dd377c5.zip
Use relative URL for thumbnails according to :only_path option (#18119).
git-svn-id: http://svn.redmine.org/redmine/trunk@13451 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/wiki_formatting/macros.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb
index d3a728963..df4f7a15f 100644
--- a/lib/redmine/wiki_formatting/macros.rb
+++ b/lib/redmine/wiki_formatting/macros.rb
@@ -236,8 +236,8 @@ module Redmine
size = nil unless size > 0
if obj && obj.respond_to?(:attachments) && attachment = Attachment.latest_attach(obj.attachments, filename)
title = options[:title] || attachment.title
- thumbnail_url = url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment, :size => size, :only_path => false)
- image_url = url_for(:controller => 'attachments', :action => 'show', :id => attachment, :only_path => false)
+ thumbnail_url = url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment, :size => size, :only_path => @only_path)
+ image_url = url_for(:controller => 'attachments', :action => 'show', :id => attachment, :only_path => @only_path)
img = image_tag(thumbnail_url, :alt => attachment.filename)
link_to(img, image_url, :class => 'thumbnail', :title => title)