Browse Source

Merge pull request #36 from nigelgbanks/ISLANDORA-356

ISLANDORA-356: Warnings issued when MIMEClass is trying to determine the
pull/37/head
Nigel Banks 13 years ago
parent
commit
f608652cf6
  1. 4
      MimeClass.inc

4
MimeClass.inc

@ -301,6 +301,7 @@ class MimeClass {
*/
private function system_mime_type_extensions() {
$out = array();
if (file_exists($this->etc_mime_types)) {
$file = fopen($this->etc_mime_types, 'r');
while (($line = fgets($file)) !== FALSE) {
$line = trim(preg_replace('/#.*/', '', $line));
@ -316,6 +317,7 @@ class MimeClass {
// We take the first ext from the line if many are present.
}
fclose($file);
}
return $out;
}
@ -328,6 +330,7 @@ class MimeClass {
*/
private function system_extension_mime_types() {
$out = array();
if (file_exists($this->etc_mime_types)) {
$file = fopen($this->etc_mime_types, 'r');
while (($line = fgets($file)) !== FALSE) {
$line = trim(preg_replace('/#.*/', '', $line));
@ -342,6 +345,7 @@ class MimeClass {
$out[$part] = $type;
}
fclose($file);
}
return $out;
}

Loading…
Cancel
Save