Changeset 4587 for branches


Ignore:
Timestamp:
06/06/11 10:36:32 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #1964 - Corrigido erro no descompartilhamento de pastas dentro do expressoMail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php

    r4583 r4587  
    5252        function open_mbox($folder = False,$force_die=true) 
    5353        { 
    54                 $folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO_8859-1"); 
     54                $folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO-8859-1"); 
    5555                if (is_resource($this->mbox)) 
    5656                { 
     
    120120                 
    121121                if(!$search_box_type || $search_box_type=="UNSEEN" || $search_box_type=="SEEN") { 
    122                         $msgs_info = imap_status($this->mbox,"{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".mb_convert_encoding( $folder, "UTF7-IMAP", "ISO_8859-1" ) ,SA_ALL); 
     122                        $msgs_info = imap_status($this->mbox,"{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".mb_convert_encoding( $folder, "UTF7-IMAP", "ISO-8859-1" ) ,SA_ALL); 
    123123 
    124124 
     
    335335                $invalid_format = false; 
    336336                $filename = $params['FILES'][0]['name']; 
    337                 $params["folder"] = mb_convert_encoding($params["folder"], "UTF7-IMAP","ISO_8859-1"); 
     337                $params["folder"] = mb_convert_encoding($params["folder"], "UTF7-IMAP","ISO-8859-1"); 
    338338                $quota = imap_get_quotaroot($this->mbox, $params["folder"]); 
    339339                if((($quota['limit'] - $quota['usage'])*1024) <= $params['FILES'][0]['size']){ 
     
    18091809                            if( $Permission )      
    18101810                            {     
    1811                                 $tmp_folder_id[1] = mb_convert_encoding( $tmp_folder_id[1], "ISO_8859-1", "UTF7-IMAP" ); 
     1811                                $tmp_folder_id[1] = mb_convert_encoding( $tmp_folder_id[1], "ISO-8859-1", "UTF7-IMAP" ); 
    18121812 
    18131813                                if( $tmp_folder_id[1]=='INBOX'.$this->imap_delimiter.'decifradas')  
     
    21192119                } 
    21202120                 
    2121                 $folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO_8859-1"); 
     2121                $folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO-8859-1"); 
    21222122                $folder_name = $params['folder_name']; 
    21232123                // Fix problem with cyrus delimiter changes. 
     
    26372637                $mbox_stream = $this->open_mbox($folder); 
    26382638                $newmailbox = ($params['new_folder']); 
    2639                 $newmailbox = mb_convert_encoding($newmailbox, "UTF7-IMAP","ISO_8859-1"); 
     2639                $newmailbox = mb_convert_encoding($newmailbox, "UTF7-IMAP","ISO-8859-1"); 
    26402640                $new_folder_name = $params['new_folder_name']; 
    26412641                $msgs_number = $params['msgs_number']; 
     
    27632763 
    27642764                $folder = $params['folder']; 
    2765                 $folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO_8859-1"); 
     2765                $folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO-8859-1"); 
    27662766                // Fix problem with cyrus delimiter changes. 
    27672767                // Dots in names: enabled/disabled. 
     
    34943494                                } 
    34953495                                 
    3496                                 $name_box = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO_8859-1" ); 
     3496                                $name_box = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO-8859-1" ); 
    34973497                                $filter = $this->remove_accents($filter); 
    34983498 
     
    35103510                                } 
    35113511                                else 
    3512                                         $folder_name = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO_8859-1" ); 
     3512                                        $folder_name = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO-8859-1" ); 
    35133513                                 
    35143514                                if(!is_resource($mbox_stream)) 
     
    35333533                                                        { 
    35343534                                                                $elem = $this->get_msg_detail($new_search,$name_box,$mbox_stream);  
    3535                                                                 $elem['boxname'] = mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" );  
     3535                                                                $elem['boxname'] = mb_convert_encoding( $name_box, "ISO-8859-1", "UTF7-IMAP" );  
    35363536                                                                $elem['uid'] = $new_search;  
    35373537                                                                /* compare dates in ordering */ 
     
    35783578                                                { 
    35793579                                                        $elem = $this->get_msg_detail($new_search,$name_box,$mbox_stream);  
    3580                                                         $elem['boxname'] = mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" );  
     3580                                                        $elem['boxname'] = mb_convert_encoding( $name_box, "ISO-8859-1", "UTF7-IMAP" );  
    35813581                                                        $elem['uid'] = $new_search;  
    35823582                                                        /* compare dates in ordering */ 
     
    37603760                            foreach ($mailboxes_list as $key => $val) 
    37613761                            { 
    3762                                 $folder = str_replace($serverString, "", imap_utf7_decode($val->name)); 
    3763                                 $folder = str_replace("&-", "&", $folder); 
     3762                                $folder = str_replace($serverString, "", $val->name); 
    37643763                                imap_setacl ($mbox_stream, $folder, "$uid", ""); 
    37653764                            } 
     
    40954094                    $quota_used = str_replace(")","",$size);  
    40964095                    $quotaPercent = (($quota_used / 1024) / $data["quota_root"]["quota_limit"])*100;  
    4097                     $folder = mb_convert_encoding($folder, "ISO_8859-1", "UTF7-IMAP");  
     4096                    $folder = mb_convert_encoding($folder, "ISO-8859-1", "UTF7-IMAP");  
    40984097                    if(!preg_match('/user\\'.$this->imap_delimiter.$this->username.'\\'.$this->imap_delimiter.'/i',$folder)){  
    40994098                            $folder = $this->functions->getLang("Inbox");  
Note: See TracChangeset for help on using the changeset viewer.