Ignore:
Timestamp:
12/16/09 16:04:54 (15 years ago)
Author:
alexandrecorreia
Message:

Ticket #808 - Busca implementada utilizando somente os grupos cadastrados.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jabberit_messenger/inc/class.contacts_im.inc.php

    r1840 r1853  
    138138                                { 
    139139                                        $group = explode(":",$tmp); 
    140                                         $array_uids = array_merge($array_uids, $this->ldap->getGroupsMemberUid($group[0], $this->serverLdap )); 
     140                                        $array_result = $this->ldap->getGroupsMemberUid($group[0], $this->serverLdap ); 
     141                                        array_shift($array_result[0]['memberuid']); 
     142                                        $array_uids = array_merge($array_uids, $array_result[0]['memberuid']); 
     143                                        unset($array_result); 
    141144                                } 
    142145                } 
     146                 
    143147        }                                
    144148 
     
    201205                                                        { 
    202206                                                                $group = explode(":",$tmpExt); 
    203                                                                 $array_uids_external = @array_merge($array_uids_external, $this->ldap->getGroupsMemberUid( $group[0], $key )); 
     207                                                                $array_result = $this->ldap->getGroupsMemberUid($group[0], $group[0], $key ); 
     208                                                                array_shift($array_result[0]['memberuid']); 
     209                                                                $array_uids_external = array_merge($array_uids_external, $array_result[0]['memberuid']); 
     210                                                                unset($array_result); 
     211                                                                //$array_uids_external = @array_merge($array_uids_external, $this->ldap->getGroupsMemberUid( $group[0], $key )); 
    204212                                                        } 
    205213                                                         
     
    263271        public final function verifyAddNewContact($pUid) 
    264272        { 
    265                 $groupsLocked = explode(";",$_SESSION['phpgw_info']['jabberit_messenger']['groups_locked']); 
    266                 $gidNumbers = array(); 
    267                 $uid = $pUid['uid']; 
    268                 $uid_User = substr($this->dn_User, 0, strpos($this->dn_User, ",")); 
    269                 $uid_User = substr($uid_User, 4); 
    270  
     273                $groupsLocked   = explode(";",$_SESSION['phpgw_info']['jabberit_messenger']['groups_locked']); 
     274                $gidNumbers             = array(); 
     275                $uid                    = $pUid['uid']; 
     276                $uid_User               = substr($this->dn_User, 0, strpos($this->dn_User, ",")); 
     277                $uid_User               = substr($uid_User, 4); 
     278                 
    271279                foreach($groupsLocked as $tmp) 
    272280                { 
     
    274282                        $gidNumbers[] = $groups[1]; 
    275283                } 
    276                  
     284 
    277285                $filter_gid = implode(")(gidnumber=",$gidNumbers); 
    278286            $filter_gid = "(gidnumber=". $filter_gid. ")"; 
    279                  
    280                 $result = $this->ldap->getGroupsMemberUid($filter_gid); 
    281                  
     287         
     288                $result = $this->ldap->getGroupsMemberUid( $filter_gid, "localhost" ); 
     289 
    282290                if( $result && is_array($result) ) 
    283291                { 
Note: See TracChangeset for help on using the changeset viewer.