From 6d5dbae53cd4b4b97da0b0c558292a7f1062a524 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 25 Jul 2008 11:13:15 -0400
Subject: [PATCH] Prefer File_Info over mime_content_type + detect mime type when uploading + some code style

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

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 1b1d0bf..9da449d 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -645,12 +645,17 @@
       $button = Q(rcube_label('delete'));
 
     foreach ($_SESSION['compose']['attachments'] as $id => $a_prop)
+    {
+      if (empty($a_prop))
+        continue;
+      
       $out .= html::tag('li', array('id' => "rcmfile".$id),
         html::a(array(
             'href' => "#delete",
             'title' => rcube_label('delete'),
             'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%d', this)", JS_OBJECT_NAME, $id)),
           $button) . Q($a_prop['name']));
+    }
   }
 
   $OUTPUT->add_gui_object('attachmentlist', $attrib['id']);

--
Gitblit v1.9.1