Ignore:
Timestamp:
09/17/09 17:39:22 (15 years ago)
Author:
eduardoalex
Message:

Ticket #421 - Ajuste no tratamento do referral para catalogo externo

File:
1 edited

Legend:

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

    r884 r1419  
    539539                         
    540540                */ 
    541                 function get_single_entry ( $id_contact, $fields ) 
     541                function get_single_entry ( $id_contact, $fields, $external=false ) 
    542542                { 
    543543                        if (!is_array($fields))  
     
    564564                                return false; 
    565565                        } 
    566                         $id_contact = preg_replace("/dc=(.*)/i",$this->src_info['dn'],$id_contact); 
     566                        if(!$external) 
     567                                $id_contact = preg_replace("/dc=(.*)/i",$this->src_info['dn'],$id_contact); 
     568                         
    567569                        $resource = @ldap_read($ldap, $id_contact, 'objectClass='.$this->src_info['obj']); 
    568570                        $n_entries = @ldap_count_entries($ldap, $resource); 
     
    578580                        } 
    579581 
    580 //                      print_r($contact); 
     582                         
    581583                         
    582584                //      $contact_data = $this->fields; 
     
    11641166                } 
    11651167                 
    1166                 function get_multiple_entries ( $id_contacts, $fields, $other_data = false ) 
     1168                function get_multiple_entries ( $id_contacts, $fields, $other_data = false, $external=false ) 
    11671169                { 
    11681170                        if (!is_array($id_contacts) or !is_array($fields) or ($other_data != false and !is_array($other_data))) 
     
    11841186                        foreach ($id_contacts as $id) 
    11851187                        { 
    1186                                 $contacts[$id] = $this->get_single_entry($id,$fields); 
     1188                                $contacts[$id] = $this->get_single_entry($id,$fields,$external); 
    11871189                        } 
    11881190                         
Note: See TracChangeset for help on using the changeset viewer.