added message/rfc822 handling
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 8 Mar 2002 21:18:17 +0000 (21:18 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 8 Mar 2002 21:18:17 +0000 (21:18 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2553 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/attachment_common.php

index 3587331d48568642e80bf6405b9ca8ee87bd6e7c..95ecd33bf9c3654d2d1f26a754aefc0e8ed89549 100644 (file)
@@ -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] . '&amp;passed_id=' . $Args[3] . '&amp;mailbox=' . $Args[4] .
+        '&amp;passed_ent_id=' . $Args[5] . '&amp;override_type0=message&amp;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=' .