Ignore:
Timestamp:
10/01/08 16:34:26 (16 years ago)
Author:
niltonneto
Message:

Implementação que verifica se algum usuário compartilhou contatos com usuário logado. O ramo "compartilhado"
só irá aparecer se existir tal compartilhamento.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contactcenter/index.php

    r395 r498  
    3939                } 
    4040        }     
    41         $obj = CreateObject('contactcenter.ui_data'); 
     41        // Verificar se há contatos compartilhados para o usuario logado 
     42        $acl = CreateObject("phpgwapi.acl",$GLOBALS['phpgw_info']['user']['account_id']);  
     43        $grants = $acl->get_grants("contactcenter"); 
     44        foreach($grants as $id => $rights){ 
     45                if ($id != $GLOBALS['phpgw_info']['user']['account_id']) { 
     46                        $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['shared_contacts'] = true;               
     47                } 
     48        } 
     49        $obj = CreateObject('contactcenter.ui_data');    
    4250        $obj->index(); 
    4351        $GLOBALS['phpgw']->common->phpgw_footer(); 
Note: See TracChangeset for help on using the changeset viewer.