"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/helpers/application_helper.rb" between
redmine-4.0.3.tar.gz and redmine-4.0.4.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

application_helper.rb  (redmine-4.0.3):application_helper.rb  (redmine-4.0.4)
skipping to change at line 762 skipping to change at line 762
end end
def parse_inline_attachments(text, project, obj, attr, only_path, options) def parse_inline_attachments(text, project, obj, attr, only_path, options)
return if options[:inline_attachments] == false return if options[:inline_attachments] == false
# when using an image link, try to use an attachment, if possible # when using an image link, try to use an attachment, if possible
attachments = options[:attachments] || [] attachments = options[:attachments] || []
attachments += obj.attachments if obj.respond_to?(:attachments) attachments += obj.attachments if obj.respond_to?(:attachments)
if attachments.present? if attachments.present?
text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))"(\s+alt="([^"]*)")? /i) do |m| text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))"(\s+alt="([^"]*)")? /i) do |m|
filename, ext, alt, alttext = $1.downcase, $2, $3, $4 filename, ext, alt, alttext = $1, $2, $3, $4
# search for the picture in attachments # search for the picture in attachments
if found = Attachment.latest_attach(attachments, CGI.unescape(filename)) if found = Attachment.latest_attach(attachments, CGI.unescape(filename))
image_url = download_named_attachment_url(found, found.filename, :only _path => only_path) image_url = download_named_attachment_url(found, found.filename, :only _path => only_path)
desc = found.description.to_s.gsub('"', '') desc = found.description.to_s.gsub('"', '')
if !desc.blank? && alttext.blank? if !desc.blank? && alttext.blank?
alt = " title=\"#{desc}\" alt=\"#{desc}\"" alt = " title=\"#{desc}\" alt=\"#{desc}\""
end end
"src=\"#{image_url}\"#{alt}" "src=\"#{image_url}\"#{alt}"
else else
m m
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)