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