[Svn] r2106 - in trunk/roundcubemail/program: include steps/mail

trac at roundcube.net trac at roundcube.net
Mon Dec 1 21:15:50 CET 2008


Author: thomasb
Date: 2008-12-01 14:15:50 -0600 (Mon, 01 Dec 2008)
New Revision: 2106

Modified:
   trunk/roundcubemail/program/include/rcube_message.php
   trunk/roundcubemail/program/steps/mail/func.inc
Log:
Insert meta content-type at top of the html head + add both content-id and content-location of related parts to replacement table

Modified: trunk/roundcubemail/program/include/rcube_message.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_message.php	2008-12-01 17:50:13 UTC (rev 2105)
+++ trunk/roundcubemail/program/include/rcube_message.php	2008-12-01 20:15:50 UTC (rev 2106)
@@ -373,14 +373,14 @@
           // skip apple resource forks
           if ($message_ctype_secondary == 'appledouble' && $secondary_type == 'applefile')
             continue;
-
-          // part belongs to a related message
-          if ($message_ctype_secondary == 'related' && $mail_part->headers['content-id']) {
+            
+          if ($message_ctype_secondary == 'related' && $mail_part->headers['content-id'])
             $mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']);
-            $this->inline_parts[] = $mail_part;
-          }
-          else if ($message_ctype_secondary == 'related' && $mail_part->headers['content-location']) {
+          if ($message_ctype_secondary == 'related' && $mail_part->headers['content-location'])
             $mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location'];
+            
+          // part belongs to a related message
+          if ($mail_part->content_id || $mail_part->content_location) {
             $this->inline_parts[] = $mail_part;
           }
           // is regular attachment

Modified: trunk/roundcubemail/program/steps/mail/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/func.inc	2008-12-01 17:50:13 UTC (rev 2105)
+++ trunk/roundcubemail/program/steps/mail/func.inc	2008-12-01 20:15:50 UTC (rev 2106)
@@ -649,7 +649,7 @@
       // add head for malformed messages, washtml cannot work without that
       if (!preg_match('/<head[^>]*>(.*)<\/head>/Uims', $html))
         $html = '<head></head>'. $html;
-      $html = substr_replace($html, '<meta http-equiv="Content-Type" content="text/html; charset='.RCMAIL_CHARSET.'" />', intval(stripos($html, '</head>')), 0);
+      $html = substr_replace($html, '<meta http-equiv="content-type" content="text/html; charset='.RCMAIL_CHARSET.'" />', intval(stripos($html, '<head>')+6), 0);
     }
 
     // clean HTML with washhtml by Frederic Motte

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



More information about the Svn mailing list