summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-08-02 07:25:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-08-02 07:25:23 +0000
commitef003caab2e45fa89d072278dc32dc8aa95e4c9a (patch)
treef2788b624f60ff1de8b5f2dcde2e6b518a8b4f58 /app
parent279e4b7aa024a308f30d60e303b16a44ebec29ed (diff)
downloadredmine-ef003caab2e45fa89d072278dc32dc8aa95e4c9a.tar.gz
redmine-ef003caab2e45fa89d072278dc32dc8aa95e4c9a.zip
Wrong syntax for resizing inline images may throw a 500 error (#20278).
Fix by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@14473 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index 8e3d578e5..d1d7c6dd0 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -294,7 +294,7 @@ class Attachment < ActiveRecord::Base
def self.latest_attach(attachments, filename)
attachments.sort_by(&:created_on).reverse.detect do |att|
- att.filename.downcase == filename.downcase
+ filename.casecmp(att.filename) == 0
end
end