Changeset 3210 for branches/2.0


Ignore:
Timestamp:
09/02/10 11:51:12 (14 years ago)
Author:
niltonneto
Message:

Ticket #1185 - Corrigido erro ao listar OU com muitos objetos dentro do Catálogo Geral.

Location:
branches/2.0/contactcenter/inc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/contactcenter/inc/class.bo_catalog_group_catalog.inc.php

    r285 r3210  
    7171                 
    7272                */ 
    73                 function find($what, $rules, $other) 
     73                function find($what, $rules, $other, $recursive=false) 
    7474                { 
    7575                        if ($ldap_info = $this->catalog['ldap']) 
    7676                        { 
    7777                                $meta_catalog =& CreateObject('contactcenter.bo_global_ldap_catalog',$ldap_info['id_source'], $ldap_info['context'], $this->external); 
    78                                 return $meta_catalog->find($what, $rules, $other); 
     78                                return $meta_catalog->find($what, $rules, $other, $recursive); 
    7979                        } 
    8080                         
     
    9595                                } 
    9696                                 
    97                                 $temp_res = $this->bo_contactcenter->catalog->find($what, $rules, $other); 
     97                                $temp_res = $this->bo_contactcenter->catalog->find($what, $rules, $other, $recursive); 
    9898                                if (is_array($temp_res) and count($temp_res)) 
    9999                                { 
  • branches/2.0/contactcenter/inc/class.bo_contactcenter.inc.php

    r752 r3210  
    206206                                 
    207207                */ 
    208                 function find($what, $rules=false, $other=false) 
    209                 { 
    210                         return $this->catalog->find($what, $rules, $other); 
     208                function find($what, $rules=false, $other=false, $recursive=false) 
     209                { 
     210                        return $this->catalog->find($what, $rules, $other, $recursive); 
    211211                } 
    212212                 
  • branches/2.0/contactcenter/inc/class.bo_global_ldap_catalog.inc.php

    r3134 r3210  
    115115                 
    116116                */ 
    117                 function find($what, $rules=false, $other=false) 
     117                function find($what, $rules=false, $other=false, $recursive=false) 
    118118                { 
    119119                        $restric_fields = $this->get_restrictions_without_branch($rules); 
     
    138138                        {                        
    139139                                $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], true); 
    140                                 $result_r = ldap_search($ldap , $this->src_info['context'], $filter, $fields, 0, $this->src_info['max_results']); 
     140                                $result_r = $recursive ? ldap_search($ldap , $this->src_info['context'], $filter, $fields, 0, $this->src_info['max_results']) : 
     141                                                ldap_list($ldap , $this->src_info['context'], $filter, $fields, 0, $this->src_info['max_results']); 
    141142                        } 
    142143                        else 
  • branches/2.0/contactcenter/inc/class.ui_data.inc.php

    r3197 r3210  
    964964                                } 
    965965                                 
    966                                 $result = $this->bo->find($find_field[0],$find_restric[0],$find_other[0]); 
     966                                $result = $this->bo->find($find_field[0],$find_restric[0],$find_other[0], $data['search_for'] != null); 
    967967                                 
    968968                                $n_entries = count($result); 
     
    12101210                                                $final[3][$i][0] = $contact['companies']['company1']['company_name']?$contact['companies']['company1']['company_name']:'none'; 
    12111211                                                if($this->page_info['actual_catalog']['class']!='bo_global_ldap_catalog'){ 
    1212                                                         $final[3][$i][1] = $contact['names_ordered'] ? urldecode($contact['names_ordered'])  : 'none'; 
     1212                                                        $final[3][$i][1] = $contact['names_ordered'] ? urldecode(is_array($contact['names_ordered']) ? $contact['names_ordered'][0] : $contact['names_ordered'])  : 'none'; 
    12131213                                                } 
    12141214                                                else { 
     
    23782378                                        //'contact.account_status', 
    23792379                                        'contact.account_visible' 
    2380                                         ), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC')); 
     2380                                        ), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'), $data['search_for'] != null); 
    23812381                        } 
    23822382 
Note: See TracChangeset for help on using the changeset viewer.