When a part is explicitly marked as an attachment, obey.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Wed, 29 Jun 2011 13:04:50 +0000 (15:04 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Wed, 29 Jun 2011 13:04:50 +0000 (15:04 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
banana/banana.inc.php.in
banana/mimepart.inc.php

index 0bee982..d28cbbc 100644 (file)
@@ -716,7 +716,7 @@ class Banana
             && isset($_SESSION['banana_message'])) {
             $message = unserialize($_SESSION['banana_message']);
             Banana::$msgshow_headers = $_SESSION['banana_showhdr'];
-        }  else {
+        } else {
             $message = Banana::$protocole->getMessage($artid);
             $_SESSION['banana_group'] = $group;
             $_SESSION['banana_artid'] = $artid;
index 28281e9..032ae4d 100644 (file)
@@ -183,6 +183,10 @@ class BananaMimePart
             }
         }
         list($type, $subtype) = explode('/', $content_type);
+        if ($disposition == 'attachment') {
+            $this->makeDataPart($content, $content_type, $encoding, $filename, $disposition, $id);
+            return;
+        }
         switch ($type) {
           case 'text': case 'message':
             $this->makeTextPart($content, $content_type, $encoding, $charset, $format);