Ignore:
Timestamp:
09/02/10 14:54:07 (14 years ago)
Author:
niltonneto
Message:

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

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

Legend:

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

    r285 r3211  
    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, false, $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, false, $recursive); 
    9898                                if (is_array($temp_res) and count($temp_res)) 
    9999                                { 
  • branches/2.2/contactcenter/inc/class.bo_contactcenter.inc.php

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

    r3135 r3211  
    113113                 
    114114                */ 
    115                 function find($what, $rules=false, $other=false, $area=false) 
     115                function find($what, $rules=false, $other=false, $area=false, $recursive=false) 
    116116                { 
    117117                        $restric_fields = $this->get_restrictions_without_branch($rules); 
     
    170170                        } 
    171171                         
    172                         $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], $followReferral); 
    173                         $result_r = ldap_search($ldap ,($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0, $this->src_info['max_results']); 
     172                        $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], $followReferral); 
     173                        $result_r = $recursive ? ldap_search($ldap ,($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0, $this->src_info['max_results']) : 
     174                                                ldap_list($ldap , ($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0, $this->src_info['max_results']); 
    174175 
    175176                        if (!$result_r) 
  • branches/2.2/contactcenter/inc/class.ui_data.inc.php

    r3198 r3211  
    13931393 
    13941394                                                if($this->page_info['actual_catalog']['class']!='bo_global_ldap_catalog'){ 
    1395                                                         $final[3][$i][1] = $contact['names_ordered'] ? urldecode($contact['names_ordered'])  : 'none'; 
     1395                                                        $final[3][$i][1] = $contact['names_ordered'] ? urldecode(is_array($contact['names_ordered']) ? $contact['names_ordered'][0] : $contact['names_ordered'])  : 'none'; 
    13961396                                                } 
    13971397                                                else { 
     
    28972897                                // Get only this attributes: dn, cn for external catalogs, 
    28982898                                // used to restrict the attributes used in filters 
    2899                                 $ids = $this->bo->find(array($data['fields']['id'], $data['fields']['search']), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC')); 
     2899                                $ids = $this->bo->find(array($data['fields']['id'], $data['fields']['search']), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'), $data['search_for'] != null); 
    29002900                        } 
    29012901                        else 
     
    29092909                                        //'contact.account_status', 
    29102910                                        'contact.account_visible' 
    2911                                         ), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'), $data['search_for_area'] ); 
     2911                                        ), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'), $data['search_for_area'], $data['search_for'] != null ); 
    29122912                        } 
    29132913 
Note: See TracChangeset for help on using the changeset viewer.