| @@ 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]) : ''; |
|
| @@ 2965-2971 (lines=7) @@ | ||
| 2962 | $type = explode(';', $type); |
|
| 2963 | $type = trim($type[0]); |
|
| 2964 | ||
| 2965 | if (in_array($type, array('application/x-empty', 'inode/x-empty'))) { |
|
| 2966 | // finfo return this mime for empty files |
|
| 2967 | $type = 'text/plain'; |
|
| 2968 | } elseif ($type == 'application/x-zip') { |
|
| 2969 | // http://elrte.org/redmine/issues/163 |
|
| 2970 | $type = 'application/zip'; |
|
| 2971 | } |
|
| 2972 | ||
| 2973 | // mime type normalization |
|
| 2974 | $_checkKey = strtolower($ext.':'.$type); |
|