| @@ 1471-1477 (lines=7) @@ | ||
| 1468 | $mime = explode(';', $mime); |
|
| 1469 | $mime = trim($mime[0]); |
|
| 1470 | ||
| 1471 | if (in_array($mime, array('application/x-empty', 'inode/x-empty'))) { |
|
| 1472 | // finfo return this mime for empty files |
|
| 1473 | $mime = 'text/plain'; |
|
| 1474 | } elseif ($mime == 'application/x-zip') { |
|
| 1475 | // http://elrte.org/redmine/issues/163 |
|
| 1476 | $mime = 'application/zip'; |
|
| 1477 | } |
|
| 1478 | } |
|
| 1479 | ||
| 1480 | return ($mime && isset($extTable[$mime]))? ('.' . $extTable[$mime]) : ''; |
|
| @@ 3100-3106 (lines=7) @@ | ||
| 3097 | $type = explode(';', $type); |
|
| 3098 | $type = trim($type[0]); |
|
| 3099 | ||
| 3100 | if (in_array($type, array('application/x-empty', 'inode/x-empty'))) { |
|
| 3101 | // finfo return this mime for empty files |
|
| 3102 | $type = 'text/plain'; |
|
| 3103 | } elseif ($type == 'application/x-zip') { |
|
| 3104 | // http://elrte.org/redmine/issues/163 |
|
| 3105 | $type = 'application/zip'; |
|
| 3106 | } |
|
| 3107 | ||
| 3108 | // mime type normalization |
|
| 3109 | $_checkKey = strtolower($ext.':'.$type); |
|