mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-08 16:41:31 +00:00
Use Redmine::MimeType.of instead of regexp to check if the attachment is Textile (#29752).
git-svn-id: http://svn.redmine.org/redmine/trunk@18586 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cffc5d6a12
commit
7763902629
@ -245,7 +245,7 @@ class Attachment < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def is_textile?
|
||||
self.filename =~ /\.textile$/i
|
||||
Redmine::MimeType.of(filename) == 'text/x-textile'
|
||||
end
|
||||
|
||||
def is_image?
|
||||
|
||||
@ -35,6 +35,7 @@ module Redmine
|
||||
'text/x-ruby' => 'rb,rbw,ruby,rake,erb',
|
||||
'text/x-csh' => 'csh',
|
||||
'text/x-sh' => 'sh',
|
||||
'text/x-textile' => 'textile',
|
||||
'text/xml' => 'xml,xsd,mxml',
|
||||
'text/yaml' => 'yml,yaml',
|
||||
'text/csv' => 'csv',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user