Changeset 6225
- Timestamp:
- 05/17/12 16:26:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/adapters/CatalogAdapter.php
r6149 r6225 45 45 $ldap_context = $_SESSION['phpgw_info']['expressomail']['ldap_server']['dn']; 46 46 $justthese = array("dn", 'jpegPhoto','givenName', 'sn'); 47 $this->getLdapCatalog()->ldapConnect(true);48 47 $ds = $this->getLdapCatalog()->ds; 49 48 if ($ds){ … … 94 93 $params = array ("search_for" => $search); 95 94 $result = $this->getLdapCatalog()->quicksearch($params); 96 95 // Reconnect for searching other attributes. 96 $this->getLdapCatalog()->ldapConnect(true); 97 97 foreach($result as $i => $row) { 98 98 if(is_int($i)) { … … 106 106 ); 107 107 // Buscar atributos faltantes. 108 if(is_array($this->getUserLdapAttrs($result[$i]['mail']))) 109 $contacts[$i] = array_merge($this->getUserLdapAttrs($result[$i]['mail']), $contacts[$i]); 108 $otherAttrs = $this->getUserLdapAttrs($result[$i]['mail']); 109 if(is_array($otherAttrs)) 110 $contacts[$i] = array_merge($otherAttrs, $contacts[$i]); 110 111 } 111 112 } 113 // Force ldap close 114 ldap_close($this->getLdapCatalog()->ds); 112 115 $result = array ('contacts' => $contacts); 113 116 $this->setResult($result);
Note: See TracChangeset
for help on using the changeset viewer.