| @@ 1427-1433 (lines=7) @@ | ||
| 1424 | $mime = explode(';', $mime); |
|
| 1425 | $mime = trim($mime[0]); |
|
| 1426 | ||
| 1427 | if (in_array($mime, array('application/x-empty', 'inode/x-empty'))) { |
|
| 1428 | // finfo return this mime for empty files |
|
| 1429 | $mime = 'text/plain'; |
|
| 1430 | } elseif ($mime == 'application/x-zip') { |
|
| 1431 | // http://elrte.org/redmine/issues/163 |
|
| 1432 | $mime = 'application/zip'; |
|
| 1433 | } |
|
| 1434 | } |
|
| 1435 | ||
| 1436 | return ($mime && isset($extTable[$mime]))? ('.' . $extTable[$mime]) : ''; |
|
| @@ 3023-3029 (lines=7) @@ | ||
| 3020 | $type = explode(';', $type); |
|
| 3021 | $type = trim($type[0]); |
|
| 3022 | ||
| 3023 | if (in_array($type, array('application/x-empty', 'inode/x-empty'))) { |
|
| 3024 | // finfo return this mime for empty files |
|
| 3025 | $type = 'text/plain'; |
|
| 3026 | } elseif ($type == 'application/x-zip') { |
|
| 3027 | // http://elrte.org/redmine/issues/163 |
|
| 3028 | $type = 'application/zip'; |
|
| 3029 | } |
|
| 3030 | ||
| 3031 | // mime type normalization |
|
| 3032 | $_checkKey = strtolower($ext.':'.$type); |
|