Ignore:
Timestamp:
02/05/10 09:58:26 (14 years ago)
Author:
valmir.sena
Message:

Ticket #882 - Falha ao tentar criar uma conta compartilhada no IE

File:
1 edited

Legend:

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

    r1913 r1983  
    345345            $owners_acl_old = $this->getaclfrombox($params); 
    346346            //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            } 
    348355 
    349356            $owners_to_remove = array_diff_assoc($owners_acl_old,$owners_acl_new); 
    350357            $owners_to_add = array_diff_assoc($owners_acl_new,$owners_acl_old); 
    351  
     358                         
    352359            //Find modified users 
    353360            $tmp_update = array_diff_assoc($owners_acl_old,$owners_to_remove); 
     
    363370            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') ){ 
    364371                $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)); 
    369376            if( is_array($owners_acl_new)){ 
    370377                foreach($owners_to_remove as $user => $acl){ 
    371378                    $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']); 
    375382                } 
    376383                //add new users 
Note: See TracChangeset for help on using the changeset viewer.