From 679f13b76346266dd2249925f629b8d72b1ea97a Mon Sep 17 00:00:00 2001 From: stekkel Date: Fri, 8 Mar 2002 21:18:17 +0000 Subject: [PATCH] added message/rfc822 handling git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2553 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/attachment_common.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/functions/attachment_common.php b/functions/attachment_common.php index 3587331d..95ecd33b 100644 --- a/functions/attachment_common.php +++ b/functions/attachment_common.php @@ -49,7 +49,8 @@ if (isset($attachment_common_types)) { } /* Register text-type attachments */ -register_attachment_common('message/rfc822', 'link_text'); +//register_attachment_common('message/rfc822', 'link_text'); +register_attachment_common('message/rfc822', 'link_message'); register_attachment_common('text/plain', 'link_text'); register_attachment_common('text/richtext', 'link_text'); @@ -104,7 +105,7 @@ function attachment_common_link_text(&$Args) /* The link that we created needs a name. "view" will be displayed for all text attachments handled by this plugin. */ $Args[1]['attachment_common']['text'] = _("view"); - + /* Each attachment has a filename on the left, which is a link. Where that link points to can be changed. Just in case the link above for viewing text attachments is not the same as the default link for @@ -117,6 +118,17 @@ function attachment_common_link_text(&$Args) } +function attachment_common_link_message(&$Args) +{ + $Args[1]['attachment_common']['href'] = '../src/download.php?startMessage=' . + $Args[2] . '&passed_id=' . $Args[3] . '&mailbox=' . $Args[4] . + '&passed_ent_id=' . $Args[5] . '&override_type0=message&override_type1=rfc822'; + /* The link that we created needs a name. "view" will be displayed for + all text attachments handled by this plugin. */ + $Args[1]['attachment_common']['text'] = _("view"); +} + + function attachment_common_link_html(&$Args) { $Args[1]['attachment_common']['href'] = '../src/download.php?startMessage=' . -- 2.25.1