There is no requirement that these content-ids are restricted to images,
so provide a more general method for loading ('related_data' URL
parameter).
$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)));
}
}
*/
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. */