Changeset 6b603da in github


Ignore:
Timestamp:
Aug 15, 2007 4:28:01 PM (6 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
ef9641e
Parents:
88f66ec
Message:

LDAP improvements

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r88f66ec r6b603da  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42007/08/15 (thomasb) 
     5---------- 
     6- Applied patch for LDAP contacts listing by Glen Ogilvie 
     7- Applied patch for more address fields in LDAP contacts (#1484402) 
     8- Close LDAP connections on script shutdown 
     9 
    310 
    4112007/08/13 (thomasb) 
  • config/main.inc.php.dist

    re3caaf5 r6b603da  
    203203 *  'name_field'    => 'cn',    // this field represents the contact's name 
    204204 *  'email_field'   => 'mail',  // this field represents the contact's e-mail 
     205 *  'surname_field' => 'sn',    // this field represents the contact's last name 
     206 *  'firstname_field' => 'gn',  // this field represents the contact's first name 
    205207 *  'scope'         => 'sub',   // search mode: sub|base|list 
    206  *  'filter'        => '',      // will be &'d with search field ex: (status=act) 
     208 *  'filter'        => '',      // used for basic listing (if not empty) and will be &'d with search queries. ex: (status=act) 
    207209 *  'fuzzy_search'  => true);   // server allows wildcard search 
    208210 */ 
  • program/include/main.inc

    r88f66ec r6b603da  
    300300function rcmail_shutdown() 
    301301  { 
    302   global $IMAP; 
     302  global $IMAP, $CONTACTS; 
    303303   
    304304  if (is_object($IMAP)) 
     
    307307    $IMAP->write_cache(); 
    308308    } 
     309     
     310  if (is_object($CONTACTS)) 
     311    $CONTACTS->close(); 
    309312     
    310313  // before closing the database connection, write session data 
  • program/include/rcube_contacts.inc

    r6d969b4 r6b603da  
    129129   
    130130  /** 
     131   * Close connection to source 
     132   * Called on script shutdown 
     133   */ 
     134  function close(){} 
     135   
     136   
     137  /** 
    131138   * List the current set of contact records 
    132139   * 
  • program/include/rcube_ldap.inc

    r6d969b4 r6b603da  
    5959        $this->fieldmap[$matches[1]] = $value; 
    6060     
    61     // $this->filter = "(dn=*)"; 
    6261    $this->connect(); 
    6362  } 
     
    143142  { 
    144143    if ($this->conn) 
     144    { 
    145145      @ldap_unbind($this->conn); 
     146      $this->conn = null; 
     147    } 
    146148  } 
    147149 
     
    213215  function list_records($cols=null, $subset=0) 
    214216  { 
     217    // add general filter to query 
     218    if (!empty($this->prop['filter'])) 
     219    { 
     220      $filter = $this->prop['filter']; 
     221      $this->set_search_set($filter); 
     222    } 
     223     
    215224    // exec LDAP search if no result resource is stored 
    216225    if ($this->conn && !$this->ldap_result) 
  • program/js/app.js

    rfc73746 r6b603da  
    22542254      page = 1; 
    22552255      this.env.current_page = page; 
     2256      this.reset_qsearch(); 
    22562257      } 
    22572258 
  • program/steps/addressbook/copy.inc

    rf115416 r6b603da  
    3737  else 
    3838    $OUTPUT->show_message('copysuccess', 'notice', array('nr' => count($success))); 
     39     
     40  // close connection to second address directory 
     41  $TARGET->close(); 
    3942} 
    40    
     43 
    4144// send response 
    4245$OUTPUT->send(); 
Note: See TracChangeset for help on using the changeset viewer.