mirror of
https://github.com/redmine/redmine.git
synced 2026-03-09 22:20:55 +01:00
Show the most recent file when displaying an inline image.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1939 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -241,6 +241,7 @@ module ApplicationHelper
|
||||
attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil)
|
||||
|
||||
if attachments
|
||||
attachments = attachments.sort_by(&:created_on).reverse
|
||||
text = text.gsub(/!((\<|\=|\>)?(\([^\)]+\))?(\[[^\]]+\])?(\{[^\}]+\})?)(\S+\.(gif|jpg|jpeg|png))!/) do |m|
|
||||
style = $1
|
||||
filename = $6
|
||||
|
||||
Reference in New Issue
Block a user