From: Michael M Slusarz Date: Thu, 13 Nov 2008 05:33:04 +0000 (-0700) Subject: Fix MDN to work with new render() output format. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5decdf717dcc18d8bee52dbe6d340cfe89c19e6b;p=horde.git Fix MDN to work with new render() output format. --- diff --git a/imp/lib/Mime/Viewer/mdn.php b/imp/lib/Mime/Viewer/mdn.php index bea75eb35..56666bb72 100644 --- a/imp/lib/Mime/Viewer/mdn.php +++ b/imp/lib/Mime/Viewer/mdn.php @@ -48,7 +48,9 @@ class IMP_Horde_Mime_Viewer_mdn extends Horde_Mime_Viewer_Driver */ protected function _renderInfo() { + $mdn_id = $this->_mimepart->getMimeId(); $parts = $this->_mimepart->contentTypeMap(); + $status = array( array( 'icon' => Horde::img('info_icon.png', _("Info"), null, $GLOBALS['registry']->getImageDir('horde')), @@ -63,7 +65,7 @@ class IMP_Horde_Mime_Viewer_mdn extends Horde_Mime_Viewer_Driver * (3) Original message (optional) */ /* Print the human readable message. */ - $curr_id = Horde_Mime::mimeIdArithmetic($this->_mimepart->getMIMEId(), 'down'); + $curr_id = $first_id = Horde_Mime::mimeIdArithmetic($this->_mimepart->getMIMEId(), 'down'); $first_part = $this->_params['contents']->renderMIMEPart($curr_id, 'inlineauto', array('params' => $this->_params)); /* Display a link to more detailed message. */ @@ -85,15 +87,17 @@ class IMP_Horde_Mime_Viewer_mdn extends Horde_Mime_Viewer_Driver $data = ''; } else { $status[0]['text'][] = _("The mail server generated the following informational message:"); - $status = array_merge($status, $first_part['status']); - $data = $first_part['data']; + $status = array_merge($status, $first_part[$first_id]['status']); + $data = $first_part[$first_id]['data']; } - return array( + $ret = array_combine(array_keys($parts), array_fill(0, count($parts), null)); + $ret[$mdn_id] = array( 'data' => $data, - 'ids' => array_keys($parts), 'status' => $status, 'type' => 'text/html; charset=' . NLS::getCharset() ); + + return $ret; } }