From 2ea27162e87f2abccd1fc3cc73969a85c48a7ade Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 06 May 2014 10:19:35 -0400
Subject: [PATCH] Add comment about behavior with empty im_*_path
---
program/lib/Roundcube/rcube_ldap.php | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index de3790e..5a4b9dd 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -377,10 +377,11 @@
// replace placeholders in filter settings
if (!empty($this->prop['filter']))
$this->prop['filter'] = strtr($this->prop['filter'], $replaces);
- if (!empty($this->prop['groups']['filter']))
- $this->prop['groups']['filter'] = strtr($this->prop['groups']['filter'], $replaces);
- if (!empty($this->prop['groups']['member_filter']))
- $this->prop['groups']['member_filter'] = strtr($this->prop['groups']['member_filter'], $replaces);
+
+ foreach (array('base_dn','filter','member_filter') as $k) {
+ if (!empty($this->prop['groups'][$k]))
+ $this->prop['groups'][$k] = strtr($this->prop['groups'][$k], $replaces);
+ }
if (!empty($this->prop['group_filters'])) {
foreach ($this->prop['group_filters'] as $i => $gf) {
@@ -1409,6 +1410,16 @@
$fieldmap['name'] = $this->group_data['name_attr'] ? $this->group_data['name_attr'] : $this->prop['groups']['name_attr'];
}
+ // assign object type from object class mapping
+ if (!empty($this->prop['class_type_map'])) {
+ foreach (array_map('strtolower', (array)$rec['objectclass']) as $objcls) {
+ if (!empty($this->prop['class_type_map'][$objcls])) {
+ $out['_type'] = $this->prop['class_type_map'][$objcls];
+ break;
+ }
+ }
+ }
+
foreach ($fieldmap as $rf => $lf)
{
for ($i=0; $i < $rec[$lf]['count']; $i++) {
--
Gitblit v1.9.1