From d15d01a8b4eb63d65a0503c3639ff9e62e0b92ef Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 12 Feb 2015 15:19:24 +0000 Subject: [PATCH] fix problem(s) with display of attachments on forward when either forwarding inline with several attachments to the forwarded message or forwarding multiple messages as attachment --- mail/inc/class.mail_ui.inc.php | 2 +- mail/js/app.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index a235c3aca2..11417cc653 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -1967,7 +1967,7 @@ class mail_ui $preventRedirect=false; if(isset($_requesteddata['id'])) $rowID = $_requesteddata['id']; - if(isset($_requesteddata['part'])) $partID = $_requesteddata['part']; + if(isset($_requesteddata['part'])) $partID = $_requesteddata['part']!='null'?$_requesteddata['part']:null; if(isset($_requesteddata['mode'])) $preventRedirect = (($_requesteddata['mode']=='display' || $_requesteddata['mode'] == 'print')?true:false); $hA = self::splitRowID($rowID); diff --git a/mail/js/app.js b/mail/js/app.js index 7a6a762f68..12333abfa3 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2239,7 +2239,8 @@ app.classes.mail = AppJS.extend( attgrid = this.et2.getArrayMgr("content").getEntry('attachments')[widget.id.replace(/\[name\]/,'')]; var mailids = this.et2.getArrayMgr("content").getEntry('processedmail_id'); var mailida = mailids.split(','); - mailid = mailida[widget.id.replace(/\[name\]/,'')]; + // either several attachments of one email, or multiple emlfiles + mailid = mailida.length==1 ? mailida[0] : mailida[widget.id.replace(/\[name\]/,'')]; if (typeof attgrid.uid != 'undefined' && attgrid.uid && mailid.indexOf(attgrid.uid)==-1) { for (var i=0; i