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