Changeset 9840ab6 in github


Ignore:
Timestamp:
Dec 14, 2010 2:37:52 AM (2 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
1ce4420
Parents:
b8793fd
Message:
  • Fix charset conversion for text attachments without charset specification (#1487634)
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r3ee5a72 r9840ab6  
    2222- Add username and IP address to log message on unsuccessful login (#1487626) 
    2323- Improved Mail-Followup-To and Mail-Reply-To headers handling 
     24- Fix charset conversion for text attachments without charset specification (#1487634) 
    2425 
    2526RELEASE 0.5-BETA 
  • program/include/rcube_imap.php

    rad399a9 r9840ab6  
    24302430        // TODO: Add caching for message parts 
    24312431 
    2432         if (!$part) $part = 'TEXT'; 
     2432        if (!$part) { 
     2433            $part = 'TEXT'; 
     2434        } 
    24332435 
    24342436        $body = $this->conn->handlePartBody($this->mailbox, $uid, true, $part, 
    24352437            $o_part->encoding, $print, $fp); 
    24362438 
    2437         if ($fp || $print) 
     2439        if ($fp || $print) { 
    24382440            return true; 
    2439  
    2440         // convert charset (if text or message part) 
    2441         if ($body && ($o_part->ctype_primary == 'text' || $o_part->ctype_primary == 'message')) { 
    2442             // assume default if no charset specified 
    2443             if (empty($o_part->charset) || strtolower($o_part->charset) == 'us-ascii') 
    2444                 $o_part->charset = $this->default_charset; 
    2445  
     2441        } 
     2442 
     2443        // convert charset (if text or message part) and part's charset is specified 
     2444        if ($body && $o_part->charset 
     2445            && preg_match('/^(text|message)$/', $o_part->ctype_primary) 
     2446        ) { 
    24462447            $body = rcube_charset_convert($body, $o_part->charset); 
    24472448        } 
Note: See TracChangeset for help on using the changeset viewer.