From 133bb07f78b9486f0a524390253f08a0b446c584 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 05 Dec 2008 02:38:54 -0500
Subject: [PATCH] - performance: skip imap connection for attachments actions - created attachments.inc file for attachment upload, remove and display actions

---
 program/steps/mail/compose.inc |   28 ----------------------------
 1 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 8a9c36a..95630b1 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -24,34 +24,6 @@
 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;
 

--
Gitblit v1.9.1