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/inc/class.bo_contactcenter.inc.php

    r285 r498  
    324324                                return false; 
    325325                        } 
    326                          
    327326                        $this->tree = array( 
    328327                                0 => array( 
     328                                        'type' => 'sql' 
     329                                ), 
     330                                1 => array( 
    329331                                        'type' => 'sql' 
    330332                                ), 
     
    346348                                ) 
    347349                        ); 
    348                          
     350                        if($_SESSION['phpgw_info']['user']['preferences']['contactcenter']['shared_contacts']){ 
     351                                $this->tree[2] = array('type' => 'sql'); 
     352                                $this->tree['branches'][2] = array('name' => lang('Shared'), 
     353                                                                                'type'       => 'catalog', 
     354                                                                                'class'      => 'bo_shared_catalog_manager', 
     355                                                                                'icon'       => 'people-mini.png', 
     356                                                                                'sub_branch' => false); 
     357                                unset($_SESSION['phpgw_info']['user']['preferences']['contactcenter']['shared_contacts']); 
     358                        } 
    349359                        $ldap = CreateObject('contactcenter.bo_ldap_manager'); 
    350360                        $ldap_srcs = $ldap->get_all_ldap_sources(); 
     
    352362                        if ($ldap_srcs) 
    353363                        { 
    354                                 $i = 2; 
     364                                $i = count($this->tree['branches']); //os Indices dos tipos tem o mesmo numero do de ramos. 
    355365                                reset($ldap_srcs); 
    356366                                while (list($id,) = each($ldap_srcs)) 
     
    392402                        if ($ldap_srcs) 
    393403                        { 
    394                                 $i = count($this->tree); 
     404                                $i = count($this->tree['branches']);//os Indices dos tipos tem o mesmo numero do de ramos. 
    395405 
    396406                                reset($ldap_srcs); 
Note: See TracChangeset for help on using the changeset viewer.