| @@ 1885-1894 (lines=10) @@ | ||
| 1882 | //error_log(__METHOD__.__LINE__.' FileSize:'.filesize($attachment['tmp_name'])); |
|
| 1883 | if ($_GET['mode'] != "save") |
|
| 1884 | { |
|
| 1885 | if (strtoupper($attachment['type']) == 'TEXT/DIRECTORY') |
|
| 1886 | { |
|
| 1887 | $sfxMimeType = $attachment['type']; |
|
| 1888 | $buff = explode('.',$attachment['tmp_name']); |
|
| 1889 | $suffix = ''; |
|
| 1890 | if (is_array($buff)) $suffix = array_pop($buff); // take the last extension to check with ext2mime |
|
| 1891 | if (!empty($suffix)) $sfxMimeType = Api\MimeMagic::ext2mime($suffix); |
|
| 1892 | $attachment['type'] = $sfxMimeType; |
|
| 1893 | if (strtoupper($sfxMimeType) == 'TEXT/VCARD' || strtoupper($sfxMimeType) == 'TEXT/X-VCARD') $attachment['type'] = strtoupper($sfxMimeType); |
|
| 1894 | } |
|
| 1895 | //error_log(__METHOD__.print_r($attachment,true)); |
|
| 1896 | if (strtoupper($attachment['type']) == 'TEXT/CALENDAR' || strtoupper($attachment['type']) == 'TEXT/X-VCALENDAR') |
|
| 1897 | { |
|
| @@ 2453-2462 (lines=10) @@ | ||
| 2450 | //error_log(__METHOD__.print_r($_GET,true)); |
|
| 2451 | if ($_GET['mode'] != "save") |
|
| 2452 | { |
|
| 2453 | if (strtoupper($attachment['type']) == 'TEXT/DIRECTORY' || empty($attachment['type'])) |
|
| 2454 | { |
|
| 2455 | $sfxMimeType = $attachment['type']; |
|
| 2456 | $buff = explode('.',$attachment['filename']); |
|
| 2457 | $suffix = ''; |
|
| 2458 | if (is_array($buff)) $suffix = array_pop($buff); // take the last extension to check with ext2mime |
|
| 2459 | if (!empty($suffix)) $sfxMimeType = Api\MimeMagic::ext2mime($suffix); |
|
| 2460 | $attachment['type'] = $sfxMimeType; |
|
| 2461 | if (strtoupper($sfxMimeType) == 'TEXT/VCARD' || strtoupper($sfxMimeType) == 'TEXT/X-VCARD') $attachment['type'] = strtoupper($sfxMimeType); |
|
| 2462 | } |
|
| 2463 | //error_log(__METHOD__.print_r($attachment,true)); |
|
| 2464 | if (strtoupper($attachment['type']) == 'TEXT/CALENDAR' || strtoupper($attachment['type']) == 'TEXT/X-VCALENDAR') |
|
| 2465 | { |
|