Browse Source

Don't flip.

pull/608/head
Jordan Dukart 10 years ago
parent
commit
b29a0f263f
  1. 3
      includes/mimetype.utils.inc

3
includes/mimetype.utils.inc

@ -22,8 +22,7 @@ function islandora_get_extension_for_mimetype($mimetype) {
$mimetype_mapping = file_mimetype_mapping(); $mimetype_mapping = file_mimetype_mapping();
$extension_index = array_search($mimetype, $mimetype_mapping['mimetypes']); $extension_index = array_search($mimetype, $mimetype_mapping['mimetypes']);
if ($extension_index !== FALSE) { if ($extension_index !== FALSE) {
$mime_array_flipped = array_reverse($mimetype_mapping['extensions']); $extension = array_search($extension_index, $mimetype_mapping['extensions']);
$extension = array_search($extension_index, $mime_array_flipped);
} }
// We can only have one mapping in drupal for 'xml'. // We can only have one mapping in drupal for 'xml'.

Loading…
Cancel
Save