From: Michael M Slusarz Date: Thu, 2 Jul 2009 19:41:27 +0000 (-0600) Subject: Fix linking images in multipart/related parts. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=045a87e706637fdb5f3f816db747f8774e4c2441;p=horde.git Fix linking images in multipart/related parts. There is no requirement that these content-ids are restricted to images, so provide a more general method for loading ('related_data' URL parameter). --- diff --git a/imp/lib/Mime/Viewer/Html.php b/imp/lib/Mime/Viewer/Html.php index 10dc51979..a893b45bf 100644 --- a/imp/lib/Mime/Viewer/Html.php +++ b/imp/lib/Mime/Viewer/Html.php @@ -156,7 +156,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html $cid = trim($cid, '<>'); if ($cid) { $cid_part = $this->_params['contents']->getMIMEPart($mime_id); - $cid_replace['cid:' . $cid] = $this->_params['contents']->urlView($cid_part, 'view_attach', array('params' => array('img_data' => 1))); + $cid_replace['cid:' . $cid] = $this->_params['contents']->urlView($cid_part, 'view_attach', array('params' => array('related_data' => 1))); } } diff --git a/imp/lib/Mime/Viewer/Images.php b/imp/lib/Mime/Viewer/Images.php index 6e5eb273a..9dc6b075b 100644 --- a/imp/lib/Mime/Viewer/Images.php +++ b/imp/lib/Mime/Viewer/Images.php @@ -42,7 +42,12 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images */ protected function _render() { - switch (Horde_Util::getFormData('imp_img_view')) { + $view = Horde_Util::getFormData('imp_img_view'); + if (Horde_Util::getFormData('related_data')) { + $view = 'data'; + } + + switch ($view) { case 'data': /* If calling page is asking us to output data, do that without * any further delay and exit. */