Ignore:
Timestamp:
10/06/10 17:24:40 (14 years ago)
Author:
eduardoalex
Message:

Ticket #1236 - Corrigida a forma de carregar o combo contendo os usuarios para adicao compartilhada

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/contactcenter/inc/class.ui_data.inc.php

    r3334 r3335  
    440440                                case 'get_qtds_compartilhado': 
    441441                                        return $this->get_qtds_compartilhado(); 
     442                                case 'get_list_owners_perms_add': 
     443                                        echo $this->get_list_owners_perms_add(); 
     444                                        return; 
    442445 
    443446                        } 
     
    15891592                        echo serialize($final); 
    15901593                } 
     1594                 
     1595                 
     1596                function get_list_owners_perms_add(){ 
     1597                        $acl = CreateObject('phpgwapi.acl'); 
     1598                        $find_result = $acl->get_rights_and_owners($GLOBALS['phpgw_info']['user']['account_id'],'contactcenter'); 
     1599                        if($find_result){ 
     1600                                $owner_names = array(); 
     1601                                $filter = "(|"; 
     1602                                foreach($find_result as $owner) { 
     1603                                        if(($owner['acl_rights'] & PHPGW_ACL_ADD) == PHPGW_ACL_ADD){ 
     1604                                                $filter .= "(uidNumber=".$owner['acl_account'].")"; 
     1605                                        } 
     1606                                } 
     1607                                if(!$this->bo->catalog->src_info) { 
     1608                                        $ldap = CreateObject('contactcenter.bo_ldap_manager'); 
     1609                                        $this->bo->catalog->src_info = $ldap->srcs[1]; 
     1610                                } 
     1611                                $ds = $GLOBALS['phpgw']->common->ldapConnect($this->bo->catalog->src_info['host'], $this->bo->catalog->src_info['acc'], $this->bo->catalog->src_info['pw'], false); 
     1612                                $filter .= ")"; 
     1613                                $dn=$this->bo->catalog->src_info['dn']; 
     1614                                $justThese = array("cn","uidnumber","uid"); 
     1615                                $sr = ldap_search($ds,$dn, $filter,$justThese); 
     1616                                $info = ldap_get_entries($ds, $sr); 
     1617                                for($z = 0; $z < $info['count']; $z++) { 
     1618                                        $owner_names[$info[$z]['uidnumber'][0]] = array("cn" => $info[$z]['cn'][0], "uid" => $info[$z]['uid'][0]); 
     1619                                } 
     1620                                ldap_close($ds); 
     1621                        } 
     1622                        echo serialize ($owner_names);   
     1623                } 
    15911624 
    15921625                function get_visible_all_ldap() 
Note: See TracChangeset for help on using the changeset viewer.