Changeset 6576 for trunk


Ignore:
Timestamp:
06/22/12 12:35:23 (12 years ago)
Author:
cristiano
Message:

Ticket #2893 - Problemas ao encaminhar mensagem - codificação do nome

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r6536 r6576  
    166166                $return = $this->get_range_msgs2($params); 
    167167 
    168                 $return['folder'] = mb_convert_encoding( $return['folder'], 'ISO_8859-1', 'UTF-8' ); 
     168                $return['folder'] = mb_convert_encoding( $return['folder'], 'ISO-8859-1', 'UTF-8' ); 
    169169 
    170170                return $return; 
     
    192192 
    193193            if(!$search_box_type || $search_box_type == 'UNSEEN' || $search_box_type == 'SEEN') { 
    194                     $msgs_info = imap_status($this->mbox,"{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".mb_convert_encoding( $folder, 'UTF7-IMAP', 'UTF-8, ISO_8859-1' ) ,SA_ALL); 
     194                    $msgs_info = imap_status($this->mbox,"{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".mb_convert_encoding( $folder, 'UTF7-IMAP', 'UTF-8, ISO-8859-1' ) ,SA_ALL); 
    195195 
    196196                    $return['tot_unseen'] = ($search_box_type == 'SEEN') ? 0 : $msgs_info->unseen; 
     
    27702770            } 
    27712771 
    2772             $folder = mb_convert_encoding($folder, 'UTF7-IMAP', 'ISO_8859-1'); 
     2772            $folder = mb_convert_encoding($folder, 'UTF7-IMAP', 'ISO-8859-1'); 
    27732773            $folder = preg_replace('/INBOX[\/.]/i', 'INBOX' . $this->imap_delimiter, $folder); 
    27742774            $folder_name = $params['folder_name']; 
     
    29222922                     if($att['disposition'] == 'embedded') 
    29232923                     { 
    2924                          $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body); 
     2924                         $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', '"'.mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1').'"', $body); 
    29252925                         $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 
    29262926                     } 
     
    29412941                                {     
    29422942                                    $body = str_ireplace('<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />' , '<img src="'.$att['name'].'" />', $body); 
    2943                                     $mailService->addStringImage($att['source'], $att['type'],mb_convert_encoding($att['name'], 'ISO_8859-1' , 'UTF-8,ISO_8859-1') ); 
     2943                                    $mailService->addStringImage($att['source'], $att['type'],mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1') ); 
    29442944                                } 
    29452945                                else 
     
    30373037                $this->rfc2397ToEmbeddedAttachment($mailService , $body); 
    30383038 
    3039                 require_once(dirname(__FILE__).'/../../library/CssToInlineStyles/css_to_inline_styles.php'); 
    3040                 $defaultStyle = '.expressoDefaultFont{'; 
    3041  
     3039                $defaultStyle = ''; 
    30423040                if(isset($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_family_editor']) && $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_family_editor']) 
    30433041                    $defaultStyle .= ' font-family:'.$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_family_editor'] .';'; 
     
    30453043                if(isset($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_size_editor']) && $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_size_editor']) 
    30463044                    $defaultStyle .= ' font-size:'.$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_size_editor'].';'; 
    3047                  
    3048                 $defaultStyle .= '}'; 
    3049  
    3050                 $cssToInlineStyles = new CSSToInlineStyles('<span class="expressoDefaultFont">'.$body.'</span>'); 
    3051                 $cssToInlineStyles->setUseInlineStylesBlock(true); 
    3052                 $cssToInlineStyles->setCSS($defaultStyle); 
    3053                 $cssToInlineStyles->setCleanup(TRUE); 
    3054                 $body = $cssToInlineStyles->convert(); //Converte as tag style em inline styles 
    3055                 unset($cssToInlineStyles); 
    3056  
     3045     
     3046                $body = '<span class="'.$defaultStyle.'">'.$body.'</span>'; 
    30573047                $mailService->setBodyHtml($body); 
    30583048            }     
     
    50195009                    $quota_used = str_replace(")","",$size);  
    50205010                    $quotaPercent = (($quota_used / 1024) / $data["quota_root"]["quota_limit"])*100;  
    5021                     $folder = mb_convert_encoding($folder, "ISO_8859-1", "UTF7-IMAP");  
     5011                    $folder = mb_convert_encoding($folder, "ISO-8859-1", "UTF7-IMAP");  
    50225012                    if(!preg_match('/user\\'.$this->imap_delimiter.$this->username.'\\'.$this->imap_delimiter.'/i',$folder)){  
    50235013                            $folder = $this->functions->getLang("Inbox");  
  • trunk/prototype/services/ImapServiceAdapter.php

    r6566 r6576  
    629629                                                if($att['disposition'] == 'embedded') 
    630630                                                { 
    631                                                         $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body); 
     631                                                        $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', '"'.mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1').'"', $body); 
    632632                                                        $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 
    633633                                                } 
Note: See TracChangeset for help on using the changeset viewer.