Changeset 1983 for trunk/expressoAdmin1_2/inc
- Timestamp:
- 02/05/10 09:58:26 (14 years ago)
- Location:
- trunk/expressoAdmin1_2/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.imap_functions.inc.php
r1913 r1983 345 345 $owners_acl_old = $this->getaclfrombox($params); 346 346 //new settings 347 $owners_acl_new = unserialize($params['owners_acl']); 347 //necessario devido a um bug do serialize do javascript do connector zera uma string 348 //serializada "N;", diferente da serializada do php "a:0:{}" 349 350 if( $params['owners_acl'] != "N;" ){ 351 $owners_acl_new = unserialize($params['owners_acl']); 352 } else { 353 $owners_acl_new = Array(); 354 } 348 355 349 356 $owners_to_remove = array_diff_assoc($owners_acl_old,$owners_acl_new); 350 357 $owners_to_add = array_diff_assoc($owners_acl_new,$owners_acl_old); 351 358 352 359 //Find modified users 353 360 $tmp_update = array_diff_assoc($owners_acl_old,$owners_to_remove); … … 363 370 if( (count($owners_to_remove) > 0 || count($owners_to_add) > 0 || count($owners_to_update) > 0) && !$this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'edit_shared_accounts_acl') ){ 364 371 $result['status'] = false; 365 $result['msg'] = $this->functions->lang('You do not have access to edit an shared account inbox acl');366 return $result;367 } 368 372 $result['msg'] = $this->functions->lang('You do not have access to edit an shared account inbox acl'); 373 return $result; 374 } 375 file_put_contents("/tmp/saida", "old ".print_r($owners_acl_old, true)."remove ".print_r($owners_to_remove, true)."add ".print_r($owners_to_add, true)."update ".print_r($owners_to_update, true)); 369 376 if( is_array($owners_acl_new)){ 370 377 foreach($owners_to_remove as $user => $acl){ 371 378 $params['user'] = $user; 372 $params['acl'] = " none";373 $user = $params['user']; 374 $result = $this->setaclfrombox($user," none",$params['uid']);379 $params['acl'] = ""; 380 $user = $params['user']; 381 $result = $this->setaclfrombox($user,"",$params['uid']); 375 382 } 376 383 //add new users -
trunk/expressoAdmin1_2/inc/class.shared_accounts.inc.php
r1913 r1983 108 108 $return['display_empty_inbox'] = $this->functions->check_acl($_SESSION['phpgw_session']['session_lid'],'empty_shared_accounts_inbox') ? 'block' : 'none'; 109 109 $return['allow_edit_shared_account_acl'] = $this->functions->check_acl($_SESSION['phpgw_session']['session_lid'],'edit_shared_accounts_acl'); 110 $return['mailquota_used'] = $quota['mailquota_used']; 111 //print_r( $owners_acl); 110 $return['mailquota_used'] = $quota['mailquota_used']; 112 111 $i = 0; 113 foreach($owners_acl as $key => $value) 114 { 115 $cn = $this->ldap_functions->uid2cn($key); 116 $return['owners_options'] .= '<option value='. $key .'>' . $cn . '</option>'; 117 $return['owners'][$i] .= $key; 118 $return['owners_acl'][$i] .= $value; 119 $i++; 120 } 112 if( is_array($owners_acl) ){ 113 foreach($owners_acl as $key => $value) 114 { 115 $cn = $this->ldap_functions->uid2cn($key); 116 $return['owners_options'] .= '<option value='. $key .'>' . $cn . '</option>'; 117 $return['owners'][$i] .= $key; 118 $return['owners_acl'][$i] .= $value; 119 $i++; 120 } 121 } else { 122 $return['owners_options'] = false; 123 $return['owners'] = false; 124 $return['owners_acl'] = false; 125 } 121 126 return $return; 122 127 }
Note: See TracChangeset
for help on using the changeset viewer.