Changeset 6877 for trunk/expressoMail1_2/inc
- Timestamp:
- 07/25/12 17:48:06 (12 years ago)
- Location:
- trunk/expressoMail1_2/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r6871 r6877 4361 4361 { 4362 4362 $return = array(); 4363 $mbox_stream = $this->open_mbox( );4363 $mbox_stream = $this->open_mbox('INBOX'); 4364 4364 4365 4365 if( $decode ) … … 4369 4369 //Afim de tratar as pastas compartilhadas, verificandos as permissoes de operacao sobre as mesmas 4370 4370 //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); 4373 4373 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 4380 4378 } 4381 4379 -
trunk/expressoMail1_2/inc/class.ldap_functions.inc.php
r6868 r6877 893 893 function getSharedUsersFrom($params){ 894 894 $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 } 920 916 921 917 $this->ldapRootConnect(false); … … 936 932 } 937 933 } 938 934 939 935 $info['myname'] = $_SESSION['phpgw_info']['expressomail']['user']['fullname']; 940 936 … … 952 948 $result = ldap_get_entries($this->ds, $sr); 953 949 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; 958 955 } 959 956 } 960 957 961 958 $_SESSION['phpgw_info']['expressomail']['user']['shared_mailboxes'] = $info; 959 962 960 return $info; 963 961 }
Note: See TracChangeset
for help on using the changeset viewer.