Ignore:
Timestamp:
12/04/09 11:47:00 (14 years ago)
Author:
rafaelraymundo
Message:

Ticket #605 - Implementação de preferência sobre uid ou cn nas pastas compratilhadas.

File:
1 edited

Legend:

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

    r1740 r1747  
    14991499                                $result[$i]['folder_name'] = array_pop($tmp_folder_parent); 
    15001500                                $result[$i]['folder_name'] = $result[$i]['folder_name'] == 'INBOX' ? 'Inbox' : $result[$i]['folder_name']; 
    1501                                 if (substr($folder_id,0,4) == 'user' && is_numeric($result[$i]['folder_name'])) { 
     1501                                if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['uid2cn'] && substr($folder_id,0,4) == 'user')       { 
    15021502                                        //$this->ldap = new ldap_functions(); 
    15031503                                        if ($cn = $this->ldap->uid2cn($result[$i]['folder_name'])){ 
     
    22322232        } 
    22332233        //Este bloco tem a finalidade de transformar o CPF das pastas compartilhadas em common name 
    2234         if (substr($new_folder_name,0,4) == 'user'){ 
    2235                 $this->ldap = new ldap_functions(); 
    2236                 $tmp_folder_name = explode($this->imap_delimiter, $new_folder_name); 
    2237                         $return['new_folder_name'] = array_pop($tmp_folder_name); 
    2238                         if (is_numeric($return['new_folder_name'])) 
    2239                                 if( $cn = $this->ldap->uid2cn($return['new_folder_name'])) 
    2240                                         $return['new_folder_name'] = $cn; 
     2234        if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['uid2cn']){ 
     2235            if (substr($new_folder_name,0,4) == 'user'){ 
     2236                $this->ldap = new ldap_functions(); 
     2237                $tmp_folder_name = explode($this->imap_delimiter, $new_folder_name); 
     2238                $return['new_folder_name'] = array_pop($tmp_folder_name); 
     2239                if( $cn = $this->ldap->uid2cn($return['new_folder_name'])) 
     2240                { 
     2241                    $return['new_folder_name'] = $cn; 
     2242                } 
     2243            } 
    22412244        } 
    22422245 
     
    30853088                    $filter = $this->remove_accents($filter); 
    30863089                    //Este bloco tem a finalidade de transformar o login (quando numerico) das pastas compartilhadas em common name 
    3087                     $folder_name = explode($this->imap_delimiter,$name_box); 
    3088                     if (is_numeric($folder_name[1])) 
     3090                    if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['uid2cn'] && substr($name_box,0,4) == 'user') 
    30893091                    { 
     3092                        $folder_name = explode($this->imap_delimiter,$name_box); 
    30903093                        $this->ldap = new ldap_functions(); 
    30913094                        if ($cn = $this->ldap->uid2cn($folder_name[1])) 
     
    30933096                            $folder_name[1] = $cn; 
    30943097                        } 
     3098                        $folder_name = implode($this->imap_delimiter,$folder_name); 
    30953099                    } 
    3096                     $folder_name = implode($this->imap_delimiter,$folder_name); 
     3100                    else 
     3101                    { 
     3102                        $folder_name = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO_8859-1" ); 
     3103                    } 
    30973104 
    30983105                    if(!is_resource($mbox_stream)) 
Note: See TracChangeset for help on using the changeset viewer.