alecpl
2008-12-03 320baf9cd24a3809cd7c25e3fce2438e948969ed
program/include/rcube_ldap.php
@@ -62,16 +62,6 @@
    $this->connect();
  }
  /**
   * PHP 4 object constructor
   *
   * @see  rcube_ldap::__construct()
   */
  function rcube_ldap($p)
  {
    $this->__construct($p);
  }
  /**
   * Establish a connection to the LDAP server
@@ -94,9 +84,9 @@
    {
      if ($lc = @ldap_connect($host, $this->prop['port']))
      {
   if ($this->prop['use_tls']===true)
     if (!ldap_start_tls($lc))
       continue;
        if ($this->prop['use_tls']===true)
          if (!ldap_start_tls($lc))
            continue;
        ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['ldap_version']);
        $this->prop['host'] = $host;
@@ -172,7 +162,7 @@
      return false;
    }
    
    if (ldap_bind($this->conn, $dn, $pass)) {
    if (@ldap_bind($this->conn, $dn, $pass)) {
      return true;
    }
@@ -570,7 +560,7 @@
   */
  function _exec_search()
  {
    if ($this->conn && $this->filter)
    if ($this->ready && $this->filter)
    {
      $function = $this->prop['scope'] == 'sub' ? 'ldap_search' : ($this->prop['scope'] == 'base' ? 'ldap_read' : 'ldap_list');
      $this->ldap_result = $function($this->conn, $this->prop['base_dn'], $this->filter, array_values($this->fieldmap), 0, 0);