Changeset 2894 in subversion


Ignore:
Timestamp:
Aug 29, 2009 4:56:00 PM (4 years ago)
Author:
alec
Message:
  • Fix gn and givenName should be synonymous in LDAP addressbook (#1485892)
Location:
trunk/roundcubemail
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r2892 r2894  
    22=========================== 
    33 
     4- Fix gn and givenName should be synonymous in LDAP addressbook (#1485892) 
    45- Add mail_domain to LDAP email entries without @ sign (#1485201) 
    56- Fix saving empty values in LDAP contact data (#1485781) 
  • trunk/roundcubemail/program/include/rcube_ldap.php

    r2893 r2894  
    5656    foreach ($p as $prop => $value) 
    5757      if (preg_match('/^(.+)_field$/', $prop, $matches)) 
    58         $this->fieldmap[$matches[1]] = strtolower($value); 
     58        $this->fieldmap[$matches[1]] = $this->_attr_name(strtolower($value)); 
     59 
     60    foreach ($this->prop['required_fields'] as $key => $val) 
     61      $this->prop['required_fields'][$key] = $this->_attr_name(strtolower($val)); 
    5962 
    6063    $this->sort_col = $p['sort']; 
     
    553556   * @access private 
    554557   */ 
    555   function _exec_search() 
     558  private function _exec_search() 
    556559  { 
    557560    if ($this->ready) 
     
    570573   * @access private 
    571574   */ 
    572   function _ldap2result($rec) 
     575  private function _ldap2result($rec) 
    573576  { 
    574577    global $RCMAIL; 
     
    596599   * @access private 
    597600   */ 
    598   function _map_field($field) 
     601  private function _map_field($field) 
    599602  { 
    600603    return $this->fieldmap[$field]; 
     
    603606   
    604607  /** 
     608   * @access private 
     609   */ 
     610  private function _attr_name($name) 
     611  { 
     612    // list of known attribute aliases 
     613    $aliases = array( 
     614      'gn' => 'givenname', 
     615      'rfc822mailbox' => 'mail', 
     616      'userid' => 'uid', 
     617      'emailaddress' => 'email', 
     618      'pkcs9email' => 'email', 
     619    ); 
     620    return isset($aliases[$name]) ? $aliases[$name] : $name; 
     621  } 
     622 
     623 
     624  /** 
    605625   * @static 
    606626   */ 
  • trunk/roundcubemail/program/steps/addressbook/func.inc

    r2887 r2894  
    5757  $CONTACTS->set_search_set($_SESSION['search'][$_REQUEST['_search']]); 
    5858 
    59  
    6059// set data source env 
    6160$OUTPUT->set_env('source', $source ? $source : '0'); 
  • trunk/roundcubemail/program/steps/addressbook/search.inc

    r543 r2894  
    3333  // save search settings in session 
    3434  $_SESSION['search'][$search_request] = $CONTACTS->get_search_set(); 
    35    
     35 
    3636  // create javascript list 
    3737  rcmail_js_contacts_list($result); 
Note: See TracChangeset for help on using the changeset viewer.