Changeset 1983 for trunk/expressoAdmin1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 02/05/10 09:58:26 (14 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.