Project

General

Profile

Feature #35683 » 0001-retrieve-filenames-of-thumbnails-when-rendering-a-PD.patch

Jens Krämer, 2021-08-04 12:50

View differences:

lib/redmine/export/pdf.rb
104 104
          atta = RDMPdfEncoding.attach(@attachments, attrname, "UTF-8")
105 105
          if atta
106 106
            return atta.diskfile
107
          elsif %r{/attachments/thumbnail/(?<id>[^/]+)/(?<size>\d+)} =~ attrname and
108
                atta = @attachments.find{|a| a.id.to_s == id} and
109
                atta.readable? and atta.visible?
110
            return atta.thumbnail(size: size)
107 111
          else
108 112
            return nil
109 113
          end
(1-1/3)