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