summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-09-09 17:58:13 +0000
committerthomascube <thomas@roundcube.net>2007-09-09 17:58:13 +0000
commit03b27176ef522cdf1cfbe44d426592ab86932781 (patch)
tree60f571b637175a78ce84b1bfab2347a6fcdabb92
parentbd4209e20979f43ccacae81ef5ce4adc80018ee2 (diff)
Applied patch for LDAP version (#1484552)
-rw-r--r--CHANGELOG6
-rw-r--r--config/main.inc.php.dist1
-rw-r--r--program/include/rcube_ldap.inc5
3 files changed, 11 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index dd3c33e4f..eccf2562d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,12 @@
CHANGELOG RoundCube Webmail
---------------------------
+2007/09/09 (thomasb)
+----------
+- Applied patch for LDAP version (#1484552)
+- Improved XHTML validation
+
+
2007/09/05 (thomasb)
----------
- Fix message list selection (#1484550)
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index 4cf7b7f86..ce6396da8 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -199,6 +199,7 @@ $rcmail_config['mail_header_delimiter'] = NULL;
* 'base_dn' => '',
* 'bind_dn' => '',
* 'bind_pass' => '',
+ * 'ldap_version' => 3, // using LDAPv3
* 'search_fields' => array('mail', 'cn'), // fields to search in
* 'name_field' => 'cn', // this field represents the contact's name
* 'email_field' => 'mail', // this field represents the contact's e-mail
diff --git a/program/include/rcube_ldap.inc b/program/include/rcube_ldap.inc
index e6a15d9dc..3de018426 100644
--- a/program/include/rcube_ldap.inc
+++ b/program/include/rcube_ldap.inc
@@ -86,11 +86,14 @@ class rcube_ldap
if (!is_array($this->prop['hosts']))
$this->prop['hosts'] = array($this->prop['hosts']);
+ if (empty($this->prop['ldap_version']))
+ $this->prop['ldap_version'] = 3;
+
foreach ($this->prop['hosts'] as $host)
{
if ($lc = @ldap_connect($host, $this->prop['port']))
{
- ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['port']);
+ ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['ldap_version']);
$this->prop['host'] = $host;
$this->conn = $lc;
break;