| @@ 1468-1474 (lines=7) @@ | ||
| 1465 | $mime = explode(';', $mime); |
|
| 1466 | $mime = trim($mime[0]); |
|
| 1467 | ||
| 1468 | if (in_array($mime, array('application/x-empty', 'inode/x-empty'))) { |
|
| 1469 | // finfo return this mime for empty files |
|
| 1470 | $mime = 'text/plain'; |
|
| 1471 | } elseif ($mime == 'application/x-zip') { |
|
| 1472 | // http://elrte.org/redmine/issues/163 |
|
| 1473 | $mime = 'application/zip'; |
|
| 1474 | } |
|
| 1475 | } |
|
| 1476 | ||
| 1477 | return ($mime && isset($extTable[$mime]))? ('.' . $extTable[$mime]) : ''; |
|
| @@ 3078-3084 (lines=7) @@ | ||
| 3075 | $type = explode(';', $type); |
|
| 3076 | $type = trim($type[0]); |
|
| 3077 | ||
| 3078 | if (in_array($type, array('application/x-empty', 'inode/x-empty'))) { |
|
| 3079 | // finfo return this mime for empty files |
|
| 3080 | $type = 'text/plain'; |
|
| 3081 | } elseif ($type == 'application/x-zip') { |
|
| 3082 | // http://elrte.org/redmine/issues/163 |
|
| 3083 | $type = 'application/zip'; |
|
| 3084 | } |
|
| 3085 | ||
| 3086 | // mime type normalization |
|
| 3087 | $_checkKey = strtolower($ext.':'.$type); |
|