| @@ 1411-1417 (lines=7) @@ | ||
| 1408 | $mime = explode(';', $mime); |
|
| 1409 | $mime = trim($mime[0]); |
|
| 1410 | ||
| 1411 | if (in_array($mime, array('application/x-empty', 'inode/x-empty'))) { |
|
| 1412 | // finfo return this mime for empty files |
|
| 1413 | $mime = 'text/plain'; |
|
| 1414 | } elseif ($mime == 'application/x-zip') { |
|
| 1415 | // http://elrte.org/redmine/issues/163 |
|
| 1416 | $mime = 'application/zip'; |
|
| 1417 | } |
|
| 1418 | } |
|
| 1419 | ||
| 1420 | return ($mime && isset($extTable[$mime]))? ('.' . $extTable[$mime]) : ''; |
|
| @@ 2955-2961 (lines=7) @@ | ||
| 2952 | $type = explode(';', $type); |
|
| 2953 | $type = trim($type[0]); |
|
| 2954 | ||
| 2955 | if (in_array($type, array('application/x-empty', 'inode/x-empty'))) { |
|
| 2956 | // finfo return this mime for empty files |
|
| 2957 | $type = 'text/plain'; |
|
| 2958 | } elseif ($type == 'application/x-zip') { |
|
| 2959 | // http://elrte.org/redmine/issues/163 |
|
| 2960 | $type = 'application/zip'; |
|
| 2961 | } |
|
| 2962 | ||
| 2963 | // mime type normalization |
|
| 2964 | $_checkKey = strtolower($ext.':'.$type); |
|