Browse Source

Add "attachments_bottom" hook to allow manipulating the attachments
or to add to the attachments (Download All plugin)

Jimmy Conner 22 years ago
parent
commit
06293b42a9
3 changed files with 6 additions and 0 deletions
  1. 2 0
      ChangeLog
  2. 1 0
      doc/plugin.txt
  3. 3 0
      functions/mime.php

+ 2 - 0
ChangeLog

@@ -67,6 +67,8 @@ Version 1.5.0 -- CVS
   - Add support for Mail-Followup-To header.
   - Add a confirmation for the user that their mail has been sent.
   - Fixed issue with forwarding emails having a ) appended to the end.
+  - Add "attachments_bottom" hook to allow manipulating/adding to the attachments
+  
 
 **************************************
 *** SquirrelMail Stable Series 1.4 ***

+ 1 - 0
doc/plugin.txt

@@ -203,6 +203,7 @@ but may be out of date soon thereafter.  You never know.  ;-)
   mailbox_display_buttons        functions/mailbox_display.php   do_hook
   message_body                   functions/mime.php              do_hook
   ^ attachment $type0/$type1     functions/mime.php              do_hook
+  attachments_bottom             functions/mime.php              hook_func
   generic_header                 functions/page_header.php       do_hook
   menuline                       functions/page_header.php       do_hook
   internal_link                  functions/page_header.php       hook_func

+ 3 - 0
functions/mime.php

@@ -534,6 +534,9 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) {
         unset($links);
         $attachments .= "</TD></TR>\n";
     }
+    $attachmentadd = do_hook_function('attachments_bottom',$attachments);
+    if ($attachmentadd != '')
+        $attachments = $attachmentadd;
     return $attachments;
 }