Changeset 1747 for trunk/expressoMail1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 12/04/09 11:47:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r1740 r1747 1499 1499 $result[$i]['folder_name'] = array_pop($tmp_folder_parent); 1500 1500 $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') { 1502 1502 //$this->ldap = new ldap_functions(); 1503 1503 if ($cn = $this->ldap->uid2cn($result[$i]['folder_name'])){ … … 2232 2232 } 2233 2233 //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 } 2241 2244 } 2242 2245 … … 3085 3088 $filter = $this->remove_accents($filter); 3086 3089 //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') 3089 3091 { 3092 $folder_name = explode($this->imap_delimiter,$name_box); 3090 3093 $this->ldap = new ldap_functions(); 3091 3094 if ($cn = $this->ldap->uid2cn($folder_name[1])) … … 3093 3096 $folder_name[1] = $cn; 3094 3097 } 3098 $folder_name = implode($this->imap_delimiter,$folder_name); 3095 3099 } 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 } 3097 3104 3098 3105 if(!is_resource($mbox_stream))
Note: See TracChangeset
for help on using the changeset viewer.