Changeset 1419
- Timestamp:
- 09/17/09 17:39:22 (15 years ago)
- Location:
- trunk/contactcenter/inc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/contactcenter/inc/class.bo_global_ldap_catalog.inc.php
r884 r1419 539 539 540 540 */ 541 function get_single_entry ( $id_contact, $fields )541 function get_single_entry ( $id_contact, $fields, $external=false ) 542 542 { 543 543 if (!is_array($fields)) … … 564 564 return false; 565 565 } 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 567 569 $resource = @ldap_read($ldap, $id_contact, 'objectClass='.$this->src_info['obj']); 568 570 $n_entries = @ldap_count_entries($ldap, $resource); … … 578 580 } 579 581 580 // print_r($contact); 582 581 583 582 584 // $contact_data = $this->fields; … … 1164 1166 } 1165 1167 1166 function get_multiple_entries ( $id_contacts, $fields, $other_data = false )1168 function get_multiple_entries ( $id_contacts, $fields, $other_data = false, $external=false ) 1167 1169 { 1168 1170 if (!is_array($id_contacts) or !is_array($fields) or ($other_data != false and !is_array($other_data))) … … 1184 1186 foreach ($id_contacts as $id) 1185 1187 { 1186 $contacts[$id] = $this->get_single_entry($id,$fields );1188 $contacts[$id] = $this->get_single_entry($id,$fields,$external); 1187 1189 } 1188 1190 -
trunk/contactcenter/inc/class.bo_ldap_manager.inc.php
r880 r1419 285 285 include(PHPGW_INCLUDE_ROOT . '/contactcenter/setup/external_catalogs.inc.php' ); 286 286 //include('external_catalogs.inc.php' ); 287 287 288 288 if (!$external_srcs[$id_source]) 289 289 { 290 290 return null; 291 291 } 292 292 293 293 // calls test_connection first. If succeeded continue, return error message otherwise. 294 294 if (!($response = $this->test_connection($external_srcs[$id_source]['host'], $external_srcs[$id_source]['acc'], $external_srcs[$id_source]['pw'], 10))) … … 468 468 // and whose attribute phpgwAccountVisible value is different from -1 469 469 $filter = '(&(!(objectClass='.$objectClass.')) (!(phpgwAccountVisible=-1)))'; 470 } 471 $context = preg_replace("/dc=(.*)/i",$this->srcs[$id_source]['dn'],$context); 470 $context = preg_replace("/dc=(.*)/i",$this->srcs[$id_source]['dn'],$context); 471 } 472 472 473 $result_res = @ldap_list($resource, $context, $filter, array(), 0, 0); 473 474 if (!$result_res) -
trunk/contactcenter/inc/class.ui_data.inc.php
r1413 r1419 484 484 $parent = substr($level, 0, $last_dot); 485 485 $child = substr($level, $last_dot+1, strlen($level)); 486 487 486 if (!($tree[$child] = $this->bo->get_catalog_tree($level))) 488 487 { … … 1186 1185 $fields['connections'] = 'default'; 1187 1186 // ?aqui alterar a chamada desse método para receber o base dn? 1188 $contacts = &$this->bo->catalog->get_multiple_entries($ids,$fields); 1187 if($external) 1188 $contacts = &$this->bo->catalog->get_multiple_entries($ids,$fields,false,true); 1189 else 1190 $contacts = &$this->bo->catalog->get_multiple_entries($ids,$fields); 1189 1191 1190 1192 … … 1206 1208 if ($index !== 'error'){ 1207 1209 $final[3][$i][0] = $contact['companies']['company1']['company_name']?$contact['companies']['company1']['company_name']:'none'; 1208 $final[3][$i][1] = $contact['names_ordered'] ? urldecode( $contact['names_ordered'] ) : 'none'; 1210 if($this->page_info['actual_catalog']['class']!='bo_global_ldap_catalog'){ 1211 $final[3][$i][1] = $contact['names_ordered'] ? urldecode($contact['names_ordered']) : 'none'; 1212 } 1213 else { 1214 $contact['names_ordered'][0] = urldecode($contact['names_ordered'][0]); 1215 $final[3][$i][1] = $contact['names_ordered'] ? $contact['names_ordered'] : 'none'; 1216 } 1209 1217 $final[3][$i][2] = $contact['companies']['company1']['title']? urldecode( $contact['companies']['company1']['title'] ) :'none'; 1210 1218 … … 1268 1276 1269 1277 $final[4][$i] = $contact['photo'] ? 1 : 0; 1278 // print_r($final[3][$i]); 1279 // exit; 1270 1280 $i++; 1271 1281 } … … 1274 1284 // coloca mensagem de erro no vetor que retorna para o browser 1275 1285 } 1286 1276 1287 } 1277 1288 $lnk_compose = "location.href=('../expressoMail1_2/index.php?to=";
Note: See TracChangeset
for help on using the changeset viewer.