[Svn] r3892 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Thu Aug 12 09:11:32 CEST 2010


Author: alec
Date: 2010-08-12 02:11:28 -0500 (Thu, 12 Aug 2010)
New Revision: 3892

Modified:
   trunk/roundcubemail/program/include/rcube_message.php
Log:
- add message_part_structure hook also for text parts of mixed messages


Modified: trunk/roundcubemail/program/include/rcube_message.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_message.php	2010-08-11 09:22:14 UTC (rev 3891)
+++ trunk/roundcubemail/program/include/rcube_message.php	2010-08-12 07:11:28 UTC (rev 3892)
@@ -393,6 +393,17 @@
                 else if ((($part_mimetype == 'text/plain' || $part_mimetype == 'text/html') && $mail_part->disposition != 'attachment') ||
                     $part_mimetype == 'message/delivery-status' || $part_mimetype == 'message/disposition-notification'
                 ) {
+                    // Allow plugins to handle also this part
+                    $plugin = $this->app->plugins->exec_hook('message_part_structure',
+                        array('object' => $this, 'structure' => $mail_part,
+                            'mimetype' => $part_mimetype, 'recursive' => true));
+
+                    if ($plugin['abort'])
+                        continue;
+
+                    $mail_part = $plugin['structure'];
+                    list($primary_type, $secondary_type) = explode('/', $plugin['mimetype']);
+
                     // add text part if it matches the prefs
                     if (!$this->parse_alternative ||
                         ($secondary_type == 'html' && $this->opt['prefer_html']) ||

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list