From b13a3a461912e60c181290711a3327b0641864a7 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 16 Oct 2019 17:01:02 +0200 Subject: [PATCH] * Mail: fix mails consists of both multipart/mixed and multipart/related create duplicated content --- api/src/Mail.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/Mail.php b/api/src/Mail.php index fa65a6a5a3..ef99fbc134 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -4703,7 +4703,7 @@ class Mail break; case 'related': - $bodyPart = array_merge($bodyPart, $this->getMultipartRelated($_uid, $part, $_htmlMode, $_preserveSeen)); + $bodyPart = array_merge($bodyPart, $this->getMultipartRelated($_uid, $part, $_htmlMode, $_preserveSeen, $partCalendar, $skipParts)); break; } break; @@ -4779,12 +4779,12 @@ class Mail * @param string $_htmlMode how to display a message, html, plain text, ... * @param boolean $_preserveSeen flag to preserve the seenflag by using body.peek * @param Horde_Mime_Part& $partCalendar =null on return text/calendar part, if one was contained or false + * @param array& $skipParts - passed by reference to have control/knowledge which parts are already fetched * @return array containing the desired part */ - function getMultipartRelated($_uid, Horde_Mime_Part $_structure, $_htmlMode, $_preserveSeen=false, &$partCalendar=null) + function getMultipartRelated($_uid, Horde_Mime_Part $_structure, $_htmlMode, $_preserveSeen=false, &$partCalendar=null, &$skipParts=array()) { - $skip = array(); - return $this->getMultipartMixed($_uid, $_structure, $_htmlMode, $_preserveSeen, $skip, $partCalendar); + return $this->getMultipartMixed($_uid, $_structure, $_htmlMode, $_preserveSeen, $skipParts, $partCalendar); } /**