Browse Source

Merge pull request #535 from MorganDawe/7.x.EMIC-130

Added application/rdf for file extension rng in mimedetect.
pull/559/head
Nigel Banks 10 years ago
parent
commit
798079f7eb
  1. 2
      includes/datastream.inc
  2. 1
      includes/mime_detect.inc

2
includes/datastream.inc

@ -54,7 +54,6 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F
// Browsers will not append all extensions. // Browsers will not append all extensions.
$mime_detect = new MimeDetect(); $mime_detect = new MimeDetect();
$extension = '.' . $mime_detect->getExtension($datastream->mimetype); $extension = '.' . $mime_detect->getExtension($datastream->mimetype);
// Prevent adding on a duplicate extension. // Prevent adding on a duplicate extension.
$label = $datastream->label; $label = $datastream->label;
$extension_length = strlen($extension); $extension_length = strlen($extension);
@ -65,7 +64,6 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F
if ($duplicate_extension_position === FALSE) { if ($duplicate_extension_position === FALSE) {
$filename .= $extension; $filename .= $extension;
} }
header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-Disposition: attachment; filename=\"$filename\"");
} }

1
includes/mime_detect.inc

@ -223,6 +223,7 @@ class MimeDetect {
"tar" => "application/x-tar", "tar" => "application/x-tar",
"gtar" => "application/x-gtar", "gtar" => "application/x-gtar",
"zip" => "application/x-zip", "zip" => "application/x-zip",
"rng" => "application/xml",
// others: // others:
'bin' => 'application/octet-stream', 'bin' => 'application/octet-stream',
// Web Archives: // Web Archives:

Loading…
Cancel
Save