|
|
@ -23,8 +23,7 @@ function islandora_get_extension_for_mimetype($mimetype) { |
|
|
|
$extension_index = array_search($mimetype, $mimetype_mapping['mimetypes']); |
|
|
|
$extension_index = array_search($mimetype, $mimetype_mapping['mimetypes']); |
|
|
|
if ($extension_index !== FALSE) { |
|
|
|
if ($extension_index !== FALSE) { |
|
|
|
// Reversing such that any altered values take precedence over the default |
|
|
|
// Reversing such that any altered values take precedence over the default |
|
|
|
// mappings. As such we need to handle the case of application/xml mapping |
|
|
|
// mappings. |
|
|
|
// to .xml. |
|
|
|
|
|
|
|
$mime_array_flipped = array_reverse($mimetype_mapping['extensions']); |
|
|
|
$mime_array_flipped = array_reverse($mimetype_mapping['extensions']); |
|
|
|
$extension = array_search($extension_index, $mime_array_flipped); |
|
|
|
$extension = array_search($extension_index, $mime_array_flipped); |
|
|
|
} |
|
|
|
} |
|
|
|