Przeglądaj źródła

added message/rfc822 handling

stekkel 23 lat temu
rodzic
commit
e49bc3f144
1 zmienionych plików z 14 dodań i 2 usunięć
  1. 14 2
      functions/attachment_common.php

+ 14 - 2
functions/attachment_common.php

@@ -49,7 +49,8 @@ if (isset($attachment_common_types)) {
 }
 }
 
 
 /* Register text-type attachments */
 /* 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/plain',     'link_text');
 register_attachment_common('text/richtext',  '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
     /* The link that we created needs a name.  "view" will be displayed for
        all text attachments handled by this plugin. */
        all text attachments handled by this plugin. */
     $Args[1]['attachment_common']['text'] = _("view");
     $Args[1]['attachment_common']['text'] = _("view");
-    
+
     /* Each attachment has a filename on the left, which is a link.
     /* 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
        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
        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)
 function attachment_common_link_html(&$Args)
 {
 {
     $Args[1]['attachment_common']['href'] = '../src/download.php?startMessage=' . 
     $Args[1]['attachment_common']['href'] = '../src/download.php?startMessage=' .