Ignore:
Timestamp:
06/28/10 11:52:02 (14 years ago)
Author:
adeildosantos
Message:

Ticket #1120 - Realizada a inlcusao da possibilidade de listar opcao extra no componente wf_select_ldap_users

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/class.bo_utils.inc.php

    r2591 r2974  
    8686                        $ret_name = empty($params['name']) ? 'cn' : $params['name']; 
    8787 
     88                        $ret_complement = empty($params['complement']) ? '' : $params['complement'];  
     89 
    8890                        $ajaxConfig = &Factory::newInstance('ajax_config', 'contactcenter'); 
    8991                        $config = $ajaxConfig->read_repository(); 
     
    103105 
    104106                                $filter     = '(&(uid=*)(phpgwAccountType=u)(!(phpgwAccountVisible=-1))(cn=*' . $cn . '*))'; 
    105                                 $attrib_ret = array('cn', $ret_id, $ret_name); 
     107 
     108                                if($ret_complement != '') 
     109                                        $attrib_ret = array('cn', $ret_id, $ret_name, $ret_complement); 
     110                                else 
     111                                        $attrib_ret = array('cn', $ret_id, $ret_name); 
    106112 
    107113                                $r = ldap_search($ds, $ldapconfig['basedn'], $filter, $attrib_ret, 0, 0, 5); 
     
    114120                                                $result = ldap_get_entries($ds, $r); 
    115121                                                foreach($result as $value){ 
    116                                                         $output['values'][] = array( 
     122                                                  if($value[$ret_name][0] != ""){  
     123                                                        if($params['complement'] != ''){ 
     124                                                                        $complement = " >> " . $value[$ret_complement][0]; 
     125                                                                        $output['values'][] = array( 
     126                                                                        'id'   => $value[$ret_id], 
     127                                                                        'name' => trim(ucwords(strtolower($value[$ret_name][0]))) . $complement ); 
     128                                                                } 
     129                                                        else{ 
     130                                                                $output['values'][] = array( 
    117131                                                                'id'   => $value[$ret_id], 
    118132                                                                'name' => trim(ucwords(strtolower($value[$ret_name][0])))); 
     133                                                        } 
     134                                                  }      
    119135                                                } 
    120136 
Note: See TracChangeset for help on using the changeset viewer.