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

trac at roundcube.net trac at roundcube.net
Tue Sep 20 20:30:27 CEST 2011


Author: alec
Date: 2011-09-20 13:30:27 -0500 (Tue, 20 Sep 2011)
New Revision: 5253

Modified:
   trunk/roundcubemail/program/include/rcube_imap.php
Log:
- Fix forwarded attachments, broken in r5204


Modified: trunk/roundcubemail/program/include/rcube_imap.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_imap.php	2011-09-20 12:41:06 UTC (rev 5252)
+++ trunk/roundcubemail/program/include/rcube_imap.php	2011-09-20 18:30:27 UTC (rev 5253)
@@ -2390,17 +2390,17 @@
             return true;
         }
 
-        // Remove NULL characters (#1486189)
-        $body = str_replace("\x00", '', $body);
+        // convert charset (if text or message part)
+        if ($body && preg_match('/^(text|message)$/', $o_part->ctype_primary)) {
+            // Remove NULL characters (#1486189)
+            $body = str_replace("\x00", '', $body);
 
-        // convert charset (if text or message part)
-        if ($body && !$skip_charset_conv &&
-            preg_match('/^(text|message)$/', $o_part->ctype_primary)
-        ) {
-            if (!$o_part->charset || strtoupper($o_part->charset) == 'US-ASCII') {
-                $o_part->charset = $this->default_charset;
+           if (!$skip_charset_conv) {
+                if (!$o_part->charset || strtoupper($o_part->charset) == 'US-ASCII') {
+                    $o_part->charset = $this->default_charset;
+                }
+                $body = rcube_charset_convert($body, $o_part->charset);
             }
-            $body = rcube_charset_convert($body, $o_part->charset);
         }
 
         return $body;

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



More information about the Svn mailing list