Changeset 6877 for trunk/expressoMail1_2


Ignore:
Timestamp:
07/25/12 17:48:06 (12 years ago)
Author:
cristiano
Message:

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

Location:
trunk/expressoMail1_2
Files:
3 edited

Legend:

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

    r6871 r6877  
    43614361        { 
    43624362                $return = array(); 
    4363                 $mbox_stream = $this->open_mbox(); 
     4363                $mbox_stream = $this->open_mbox('INBOX'); 
    43644364                 
    43654365                if( $decode ) 
     
    43694369                //Afim de tratar as pastas compartilhadas, verificandos as permissoes de operacao sobre as mesmas 
    43704370                //No caso de se tratar da caixa do proprio usuario logado, utiliza a sintaxe abaixo 
    4371                 if(substr($user,0,4) != 'user') 
    4372                 $mbox_acl = imap_getacl($mbox_stream, 'user'.$this->imap_delimiter.$user); 
     4371                if(substr($user,0,5) != 'user'.$this->imap_delimiter) 
     4372                        $mbox_acl = imap_getacl($mbox_stream, 'user'.$this->imap_delimiter.$user); 
    43734373                else 
    4374                   $mbox_acl = @imap_getacl($mbox_stream, $user); 
    4375                  
    4376                 if(isset($mbox_acl[$this->username])) 
    4377                 return $mbox_acl[$this->username]; 
    4378                 else  
    4379                     return ''; 
     4374                        $mbox_acl = imap_getacl($mbox_stream, $user); 
     4375                 
     4376                return (isset($mbox_acl[$this->username])) ? $mbox_acl[$this->username] : ''; 
     4377                
    43804378        } 
    43814379 
  • trunk/expressoMail1_2/inc/class.ldap_functions.inc.php

    r6868 r6877  
    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); 
     
    936932                                } 
    937933                        } 
    938                  
     934 
    939935                        $info['myname'] = $_SESSION['phpgw_info']['expressomail']['user']['fullname']; 
    940936 
     
    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                } 
  • trunk/expressoMail1_2/js/sharemailbox.js

    r6848 r6877  
    4646                if ((this.users[user].acls.indexOf('l',0) >= 0) && 
    4747                        (this.users[user].acls.indexOf('r',0) >= 0) && 
     48                         
    4849                        (this.users[user].acls.indexOf('s',0) >= 0) ) 
    4950                { 
     
    7374                } 
    7475                 
    75                 if (this.users[user].acls != "false" && this.users[user].acls.indexOf('p',0) >= 0) 
     76                if (this.users[user].acls != "false" && this.users[user].acls.indexOf('p',0) >= 0 && this.users[user].acls.indexOf('a',0) >= 0) 
    7677                { 
    7778                        Element('em_input_sendAcl').disabled = false; 
     
    117118                }                
    118119                if (Element('em_input_sendAcl').checked){ 
    119                         acl += 'p';                      
     120                        acl += 'pa';                     
    120121                } 
    121122 
Note: See TracChangeset for help on using the changeset viewer.