From 579ce5c9cf558e1ba999b303fb207fee9e4fc665 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 30 Apr 2007 19:40:09 +0000 Subject: [PATCH] Fix message body in banana feeds git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@239 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- banana/feed.inc.php | 2 +- banana/mimepart.inc.php | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/banana/feed.inc.php b/banana/feed.inc.php index b4fef0b..32a3d40 100644 --- a/banana/feed.inc.php +++ b/banana/feed.inc.php @@ -72,7 +72,7 @@ class BananaFeed $array['author'] = $message->getAuthorName(); $array['date'] = $message->getHeaderValue('Date'); $array['title'] = $message->getHeaderValue('Subject'); - $array['body'] = $message->toHtml(); + $array['body'] = $message->getFormattedBody(); $array['link'] = Banana::$page->makeUrl(array('group' => $this->group, 'artid' => $key)); if (Banana::$protocole->canSend()) { $array['reply'] = Banana::$page->makeUrl(array('group' => $this->group, 'artid' => $key, 'action' => 'new')); diff --git a/banana/mimepart.inc.php b/banana/mimepart.inc.php index 9a2b503..18ba4c0 100644 --- a/banana/mimepart.inc.php +++ b/banana/mimepart.inc.php @@ -434,14 +434,13 @@ class BananaMimePart 'part' => $part, 'text' => $this->filename ? $this->filename : $this->content_type, 'img' => 'save')) . ']'; - } else { - if ($type == 'multipart' && ($subtype == 'mixed' || $subtype == 'report')) { - $text = ''; - foreach ($this->multipart as &$part) { - $text .= $part->toHtml(); - } - return $text; + } elseif ($type == 'multipart' && ($subtype == 'mixed' || $subtype == 'report')) { + $text = ''; + foreach ($this->multipart as &$part) { + $text .= $part->toHtml(); } + return $text; + } else { switch ($subtype) { case 'html': return banana_formatHtml($this); case 'enriched': case 'richtext': return banana_formatRichText($this); -- 2.1.4