Ignore:
Timestamp:
10/06/09 10:27:46 (15 years ago)
Author:
wmerlotto
Message:

Ticket #628 - Implementada a funcionalidade de adição no catálogo compartilhado.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contactcenter/inc/class.bo_shared_people_manager.inc.php

    r752 r1496  
    5050                        $array_map = array(); 
    5151                        $rules_inicio = $rules; 
    52                          
     52         
    5353                        foreach($relacionados as $uid_relacionado => $tipo_relacionamento) { 
    5454                                $aclTemp = CreateObject("phpgwapi.acl",$uid_relacionado);  
    5555                                $aclTemp->read(); 
    5656                                $perms_relacao = $aclTemp->get_specific_rights($GLOBALS['phpgw_info']['user']['account_id'],'contactcenter'); //Preciso verificar as permissões que o contato relacionado deu para o atual 
    57                                                          
     57                                 
    5858                                if(!($perms_relacao&1)) //Se não tiver permissão de leitura, nem se preocupe em listá-los 
    5959                                        continue; 
     
    931931                        @return integer $id The Contact ID 
    932932                */       
    933                 function add_single_entry ( $data ) 
     933                function add_single_entry ( $data , $owner) 
    934934                { 
    935935                        $permissions = $this->security->get_permissions(); 
     
    10541054                        if ($altered) 
    10551055                        { 
    1056                                 $contact->set_field('id_owner',$GLOBALS['phpgw_info']['user']['account_id']); 
     1056                                if ($owner) 
     1057                                {        
     1058                                        $contact->set_field('id_owner',$owner); 
     1059                                }else 
     1060                                        $contact->set_field('id_owner',$GLOBALS['phpgw_info']['user']['account_id']); 
    10571061                                return $contact->commit(); 
    10581062                        } 
Note: See TracChangeset for help on using the changeset viewer.