Changeset 469


Ignore:
Timestamp:
09/24/08 09:46:11 (16 years ago)
Author:
niltonneto
Message:

Somente identação e otimização correta no código da classe imap.

File:
1 edited

Legend:

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

    r449 r469  
    432432                                $this->has_cid = true; 
    433433                         
    434                         if (strtolower($msg->structure[$msg_number]->subtype) == "alternative") 
    435                         { 
    436                                 $show_only_html = false; 
    437                                 foreach($msg->pid[$msg_number] as $values => $msg_part) 
    438                                 { 
     434                        if (strtolower($msg->structure[$msg_number]->subtype) == "alternative") { 
     435                                $show_only_html = false; 
     436                                foreach($msg->pid[$msg_number] as $values => $msg_part) { 
    439437                                        $file_type = strtolower($msg->file_type[$msg_number][$values]); 
    440438                                        if($file_type == "text/html") 
    441                                 $show_only_html = true;                  
    442                                 } 
    443                         } 
     439                                                $show_only_html = true;                  
     440                                } 
     441                        } 
    444442                        else 
    445443                                $show_only_html = false; 
     
    989987                if (is_array($folders_list)) { 
    990988                        reset($folders_list); 
    991                 $this->ldap = new ldap_functions(); 
    992989                         
    993990                        $i = 0; 
     
    10051002                                $result[$i]['folder_name'] = $result[$i]['folder_name'] == 'INBOX' ? 'Inbox' : $result[$i]['folder_name']; 
    10061003                                if (is_numeric($result[$i]['folder_name']))     { 
     1004                                        $this->ldap = new ldap_functions(); 
    10071005                                        if ($cn = $this->ldap->uid2cn($result[$i]['folder_name'])){ 
    10081006                                                $result[$i]['folder_name'] = $cn; 
     
    13101308                                error_log("$now - $userip - $sent [$subject] - $userid => $addrs\r\n", 3, "/home/expressolivre/mail_senders.log"); 
    13111309                        } 
    1312                         if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts']) 
    1313                         { 
    1314                         $contacts = new dynamic_contacts(); 
    1315                         $contacts->add_dynamic_contacts($toaddress.$ccaddress.$ccoaddress); 
     1310                        if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts']) { 
     1311                                $contacts = new dynamic_contacts(); 
     1312                                $contacts->add_dynamic_contacts($toaddress.$ccaddress.$ccoaddress); 
    13161313                        } 
    13171314                        return true; 
     
    21922189        } 
    21932190 
    2194         function search_msg($params = ''){ 
    2195                 $this->ldap = new ldap_functions(); 
     2191        function search_msg($params = ''){               
    21962192                $retorno = ""; 
    21972193                $mbox_stream = ""; 
     
    22152211                                $name_box = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO_8859-1" );  
    22162212                                $filter = $this->remove_accents($filter); 
     2213                                //Este bloco tem a finalidade de transformar o CPF das pastas compartilhadas em common name 
    22172214                                $folder_name = explode($this->imap_delimiter,$name_box); 
    2218                                 if (is_numeric($folder_name[1])) 
    2219                                 { 
    2220                                         if ($cn = $this->ldap->uid2cn($folder_name[1])) 
    2221                                         { 
    2222                                         $folder_name[1] = $cn;   
     2215                                if (is_numeric($folder_name[1])) { 
     2216                                        $this->ldap = new ldap_functions(); 
     2217                                        if ($cn = $this->ldap->uid2cn($folder_name[1])) { 
     2218                                                $folder_name[1] = $cn; 
    22232219                                        } 
    22242220                                } 
Note: See TracChangeset for help on using the changeset viewer.