| @@ 1416-1422 (lines=7) @@ | ||
| 1413 | $mime = explode(';', $mime); |
|
| 1414 | $mime = trim($mime[0]); |
|
| 1415 | ||
| 1416 | if (in_array($mime, array('application/x-empty', 'inode/x-empty'))) { |
|
| 1417 | // finfo return this mime for empty files |
|
| 1418 | $mime = 'text/plain'; |
|
| 1419 | } elseif ($mime == 'application/x-zip') { |
|
| 1420 | // http://elrte.org/redmine/issues/163 |
|
| 1421 | $mime = 'application/zip'; |
|
| 1422 | } |
|
| 1423 | } |
|
| 1424 | ||
| 1425 | return ($mime && isset($extTable[$mime]))? ('.' . $extTable[$mime]) : ''; |
|
| @@ 2979-2985 (lines=7) @@ | ||
| 2976 | $type = explode(';', $type); |
|
| 2977 | $type = trim($type[0]); |
|
| 2978 | ||
| 2979 | if (in_array($type, array('application/x-empty', 'inode/x-empty'))) { |
|
| 2980 | // finfo return this mime for empty files |
|
| 2981 | $type = 'text/plain'; |
|
| 2982 | } elseif ($type == 'application/x-zip') { |
|
| 2983 | // http://elrte.org/redmine/issues/163 |
|
| 2984 | $type = 'application/zip'; |
|
| 2985 | } |
|
| 2986 | ||
| 2987 | // mime type normalization |
|
| 2988 | $_checkKey = strtolower($ext.':'.$type); |
|