Changeset 7083 for branches/2.4
- Timestamp:
- 08/21/12 16:23:18 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4/expressoMail1_2/inc/class.ldap_functions.inc.php
r7020 r7083 185 185 } 186 186 187 $tmp = array(); 188 $tmp_users_from_user_org = array(); 189 190 for ($i=0; $i<$info["count"]; $i++) 187 $tmp = array(); 188 $tmp_users_from_user_org = array(); 189 190 for ($i=0; $i<$info["count"]; $i++) 191 { 192 $key = $info[$i]["mail"][0] . '%' . $info[$i]["telephonenumber"][0] . '%'. $info[$i]["mobile"][0] . '%' . $info[$i]["uid"][0] . '%' . $info[$i]["jpegphoto"]['count'] . '%' . $info[$i]["employeenumber"][0] . '%' . $info[$i]["ou"][0]; 193 194 if (/*(!$quickSearch_only_in_userSector) &&*/ preg_match("/$user_sector_dn/i", $info[$i]['dn'])) 191 195 { 192 $key = $info[$i]["mail"][0] . '%' . $info[$i]["telephonenumber"][0] . '%'. $info[$i]["mobile"][0] . '%' . $info[$i]["uid"][0] . '%' . $info[$i]["jpegphoto"]['count'] . '%' . $info[$i]["employeenumber"][0] . '%' . $info[$i]["ou"][0]; 193 194 if (/*(!$quickSearch_only_in_userSector) &&*/ preg_match("/$user_sector_dn/i", $info[$i]['dn'])) 195 { 196 $tmp_users_from_user_org[$key] = utf8_decode($info[$i]["cn"][0]); 197 continue; 198 } 199 200 $tmp[$key] = utf8_decode($info[$i]["cn"][0]); 201 } 196 $tmp_users_from_user_org[$key] = utf8_decode($info[$i]["cn"][0]); 197 continue; 198 } 199 200 $tmp[$key] = utf8_decode($info[$i]["cn"][0]); 201 } 202 202 203 203 natcasesort($tmp_users_from_user_org); … … 219 219 } 220 220 $contacts_result['quickSearch_only_in_userSector'] = $quickSearch_only_in_userSector; 221 $contacts_result['maxResult'] = $ldapService->limit; 221 $contacts_result['maxResult'] = $ldapService->limit; 222 222 } 223 223 else … … 275 275 276 276 ldap_close($this->ds); 277 278 277 return $contacts_result; 279 278 } … … 495 494 $info_return['extra_ldap_fields'] = $campos_extras; 496 495 497 foreach($info_return as $i=>$value) 498 $info_return[$i]['type_contact'] = "G"; 499 496 foreach($info_return as &$value){ 497 $value['type_contact'] = "G"; 498 499 //Converte a descrição dos filtros para ISO8859 corrigindo inconsitências com caractéres especiais 500 if(isset($value['vacationinfo']) && isset($value['vacationinfo'][0]) && $value['vacationinfo'][0] != '') 501 $value['vacationinfo'][0] = $this->toISO8859($value['vacationinfo'][0]); 502 } 503 500 504 $info_return['search_for'] = $params['search_for']; 505 501 506 return $info_return; 502 507 }
Note: See TracChangeset
for help on using the changeset viewer.