From 1e4c12929788f1283847c78ace06ea6271c970e5 Mon Sep 17 00:00:00 2001 From: thomasb Date: Sun, 23 Nov 2008 12:37:55 +0000 Subject: Suppress repeated ldap warnings + little codestyle fix git-svn-id: https://svn.roundcube.net/trunk@2080 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_ldap.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'roundcubemail/program/include') diff --git a/roundcubemail/program/include/rcube_ldap.php b/roundcubemail/program/include/rcube_ldap.php index 929634e5e..bbbff46a4 100644 --- a/roundcubemail/program/include/rcube_ldap.php +++ b/roundcubemail/program/include/rcube_ldap.php @@ -84,9 +84,9 @@ class rcube_ldap { 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; @@ -162,7 +162,7 @@ class rcube_ldap return false; } - if (ldap_bind($this->conn, $dn, $pass)) { + if (@ldap_bind($this->conn, $dn, $pass)) { return true; } @@ -560,7 +560,7 @@ class rcube_ldap */ 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); -- cgit v1.2.3