diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-12-05 07:38:54 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-12-05 07:38:54 +0000 |
| commit | 758d9a67c59737789d004ac9bc58df451353bea4 (patch) | |
| tree | d99ef622835df07af7532e9d2d8e305510d4facb /roundcubemail/program/steps/mail/compose.inc | |
| parent | b81d8a5300b1b27ef7eb766902311b8c6b0be1b1 (diff) | |
- performance: skip imap connection for attachments actions
- created attachments.inc file for attachment upload, remove and display actions
git-svn-id: https://svn.roundcube.net/trunk@2121 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/compose.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/compose.inc | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc index 8a9c36a04..95630b154 100644 --- a/roundcubemail/program/steps/mail/compose.inc +++ b/roundcubemail/program/steps/mail/compose.inc @@ -24,34 +24,6 @@ define('RCUBE_COMPOSE_REPLY', 0x0106); define('RCUBE_COMPOSE_FORWARD', 0x0107); define('RCUBE_COMPOSE_DRAFT', 0x0108); - -// remove an attachment -if ($RCMAIL->action=='remove-attachment' && preg_match('/^rcmfile([0-9]+)$/', $_POST['_file'], $regs)) -{ - $id = $regs[1]; - if (is_array($_SESSION['compose']['attachments'][$id])) - { - @unlink($_SESSION['compose']['attachments'][$id]['path']); - unset($_SESSION['compose']['attachments'][$id]); - $OUTPUT->command('remove_from_attachment_list', "rcmfile$id"); - $OUTPUT->send(); - } - exit; -} - -if ($RCMAIL->action=='display-attachment' && preg_match('/^rcmfile([0-9]+)$/', $_GET['_file'], $regs)) -{ - $id = $regs[1]; - if (is_array($_SESSION['compose']['attachments'][$id])) - { - $apath = $_SESSION['compose']['attachments'][$id]['path']; - header('Content-Type: ' . $_SESSION['compose']['attachments'][$id]['mimetype']); - header('Content-Length: ' . filesize($apath)); - readfile($apath); - } - exit; -} - $MESSAGE_FORM = NULL; $MESSAGE = NULL; |
