| @@ 2437-2446 (lines=10) @@ | ||
| 2434 | //error_log(__METHOD__.print_r($_GET,true)); |
|
| 2435 | if ($_GET['mode'] != "save") |
|
| 2436 | { |
|
| 2437 | if (strtoupper($attachment['type']) == 'TEXT/DIRECTORY' || empty($attachment['type'])) |
|
| 2438 | { |
|
| 2439 | $sfxMimeType = $attachment['type']; |
|
| 2440 | $buff = explode('.',$attachment['filename']); |
|
| 2441 | $suffix = ''; |
|
| 2442 | if (is_array($buff)) $suffix = array_pop($buff); // take the last extension to check with ext2mime |
|
| 2443 | if (!empty($suffix)) $sfxMimeType = Api\MimeMagic::ext2mime($suffix); |
|
| 2444 | $attachment['type'] = $sfxMimeType; |
|
| 2445 | if (strtoupper($sfxMimeType) == 'TEXT/VCARD' || strtoupper($sfxMimeType) == 'TEXT/X-VCARD') $attachment['type'] = strtoupper($sfxMimeType); |
|
| 2446 | } |
|
| 2447 | //error_log(__METHOD__.print_r($attachment,true)); |
|
| 2448 | if (strtoupper($attachment['type']) == 'TEXT/CALENDAR' || strtoupper($attachment['type']) == 'TEXT/X-VCALENDAR') |
|
| 2449 | { |
|
| @@ 1878-1887 (lines=10) @@ | ||
| 1875 | //error_log(__METHOD__.__LINE__.' FileSize:'.filesize($attachment['tmp_name'])); |
|
| 1876 | if ($_GET['mode'] != "save") |
|
| 1877 | { |
|
| 1878 | if (strtoupper($attachment['type']) == 'TEXT/DIRECTORY') |
|
| 1879 | { |
|
| 1880 | $sfxMimeType = $attachment['type']; |
|
| 1881 | $buff = explode('.',$attachment['tmp_name']); |
|
| 1882 | $suffix = ''; |
|
| 1883 | if (is_array($buff)) $suffix = array_pop($buff); // take the last extension to check with ext2mime |
|
| 1884 | if (!empty($suffix)) $sfxMimeType = Api\MimeMagic::ext2mime($suffix); |
|
| 1885 | $attachment['type'] = $sfxMimeType; |
|
| 1886 | if (strtoupper($sfxMimeType) == 'TEXT/VCARD' || strtoupper($sfxMimeType) == 'TEXT/X-VCARD') $attachment['type'] = strtoupper($sfxMimeType); |
|
| 1887 | } |
|
| 1888 | //error_log(__METHOD__.print_r($attachment,true)); |
|
| 1889 | if (strtoupper($attachment['type']) == 'TEXT/CALENDAR' || strtoupper($attachment['type']) == 'TEXT/X-VCALENDAR') |
|
| 1890 | { |
|