| @@ 1475-1481 (lines=7) @@ | ||
| 1472 | $mime = explode(';', $mime); |
|
| 1473 | $mime = trim($mime[0]); |
|
| 1474 | ||
| 1475 | if (in_array($mime, array('application/x-empty', 'inode/x-empty'))) { |
|
| 1476 | // finfo return this mime for empty files |
|
| 1477 | $mime = 'text/plain'; |
|
| 1478 | } elseif ($mime == 'application/x-zip') { |
|
| 1479 | // http://elrte.org/redmine/issues/163 |
|
| 1480 | $mime = 'application/zip'; |
|
| 1481 | } |
|
| 1482 | } |
|
| 1483 | ||
| 1484 | return ($mime && isset($extTable[$mime]))? ('.' . $extTable[$mime]) : ''; |
|
| @@ 3091-3097 (lines=7) @@ | ||
| 3088 | $type = explode(';', $type); |
|
| 3089 | $type = trim($type[0]); |
|
| 3090 | ||
| 3091 | if (in_array($type, array('application/x-empty', 'inode/x-empty'))) { |
|
| 3092 | // finfo return this mime for empty files |
|
| 3093 | $type = 'text/plain'; |
|
| 3094 | } elseif ($type == 'application/x-zip') { |
|
| 3095 | // http://elrte.org/redmine/issues/163 |
|
| 3096 | $type = 'application/zip'; |
|
| 3097 | } |
|
| 3098 | ||
| 3099 | // mime type normalization |
|
| 3100 | $_checkKey = strtolower($ext.':'.$type); |
|