Ignore:
Timestamp:
07/26/12 15:59:09 (12 years ago)
Author:
eduardow
Message:

Ticket #2898 - Bug na exibição de campo DE - send message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/expressoMail1_2/inc/class.ldap_functions.inc.php

    r6870 r6884  
    893893        function getSharedUsersFrom($params){ 
    894894                $filter = ''; 
    895                 //Added to save if must save sent messages in shared folder 
    896                 $acl_save_sent_in_shared = array(); 
    897                  
    898                 $acls = $this->imap->getacl(); 
    899  
    900                 if($params['uids']) { 
    901                         $uids = explode(";",$params['uids']); 
    902                         $this->imap = new imap_functions();                      
    903                         foreach($uids as $index => $uid){                
    904                          
    905                                 $params = array(); 
    906                                 //Added to save if user has create permission  
    907                                 $acl_create_message = array(); 
    908                                 $user_arr = array(); 
    909                                 $user_arr['user'] = $uid; 
    910                                 $user_arr['getShared'] = true; 
    911                                  
    912                                 if(isset($acls[$uid])){  
    913                             if ( preg_match("/[pa]+/",$acls[$uid]['acls'])){     
    914                                                 $filter .= "(uid=$uid)";                                                         
    915                                                 $acl_save_sent_in_shared[] =$uid;                        
    916                                         }        
    917                                 } 
    918                         }                        
    919                 } 
     895                $i = 0;           
     896        //Added to save if must save sent messages in shared folder  
     897        $acl_save_sent_in_shared = array();  
     898         
     899        if($params['uids']) {  
     900                $uids = explode(";",$params['uids']);  
     901                $this->imap = new imap_functions();                       
     902                foreach($uids as $index => $uid){  
     903                        $params = array();  
     904                        //Added to save if user has create permission  
     905                        $acl_create_message = array();  
     906                        $acl = $this->imap->getacltouser($uid ,true);  
     907    
     908                        if ( preg_match("/p/",$acl )){                           
     909                            $filter .= "(uid=$uid)";                                                      
     910                            $acl_save_sent_in_shared[ $i ] =$uid;  
     911                            $i++;  
     912                                                                         
     913                        }                                                         
     914                }                         
     915        } 
    920916                 
    921917                $this->ldapRootConnect(false); 
     
    952948                                $result = ldap_get_entries($this->ds, $sr); 
    953949                                for ($j = 0;$j < $result["count"]; $j++){ 
    954                                         $info[$i]['cn'][0] = utf8_decode($result[$j]['cn'][0]); 
    955                                         $info[$i]['mail'][0] = $result[$j]['mail'][0]; 
    956                                         $info[$i]['save_shared'][0] = 'n'; 
    957                                         $info[$i++]['uid'][0] = $result[$j]['uid'][0];                                   
     950                                        $result[$j]['cn'][0] = utf8_decode($result[$j]['cn'][0]);  
     951                    $result[$j]['mail'][0] = $result[$j]['mail'][0];  
     952                    $result[$j]['save_shared'][0] = 'n';  
     953                    $info[$info['count']] = $result[$j];  
     954                    $info['count'] = (int)$info['count'] + 1;                                    
    958955                                } 
    959956                        } 
    960957 
    961958                        $_SESSION['phpgw_info']['expressomail']['user']['shared_mailboxes'] = $info; 
     959                         
    962960                        return $info; 
    963961                } 
Note: See TracChangeset for help on using the changeset viewer.