From: x2003bruneau Date: Fri, 4 May 2007 21:34:49 +0000 (+0000) Subject: Fix the way attachments are displayed in multipart messages X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=859a6a39ee4330d5454fba62713e3f3e818c9c16;p=banana.git Fix the way attachments are displayed in multipart messages git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@244 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- diff --git a/banana/mimepart.inc.php b/banana/mimepart.inc.php index 18ba4c0..81a593a 100644 --- a/banana/mimepart.inc.php +++ b/banana/mimepart.inc.php @@ -50,8 +50,8 @@ class BananaMimePart $this->id = $id; if (is_null($content_type) || $content_type == 'application/octet-stream') { $this->decodeContent(); - $this->content_type = BananaMimePart::getMimeType($body, false); - } + $this->content_type = BananaMimePart::getMimeType($this->body, false); + } } protected function makeFilePart($file, $content_type =null, $disposition = 'attachment') @@ -423,8 +423,9 @@ class BananaMimePart 'artid' => Banana::$artid, 'part' => $part))) . '" alt="' . banana_htmlentities($this->filename) . '" />'; - } elseif (!in_array($type, Banana::$msgshow_mimeparts) - && !in_array($this->content_type, Banana::$msgshow_mimeparts)) { + } elseif ((!in_array($type, Banana::$msgshow_mimeparts) + && !in_array($this->content_type, Banana::$msgshow_mimeparts)) + || $this->disposition == 'attachment') { $part = $this->id ? $this->id : $this->filename; if (!$part) { $part = $this->content_type;