summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_ldap_generic.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-02-13 16:57:16 +0100
committerThomas Bruederli <thomas@roundcube.net>2013-02-13 16:57:16 +0100
commitf924f5f0aa77fffe0da901f99214a636ec92c963 (patch)
treef0017fcd4209fdcb7b34d28ad096f9f6d7f11660 /program/lib/Roundcube/rcube_ldap_generic.php
parent49cb6984ed35ff4342ae31b73269ff2d6a2186e8 (diff)
Improve group members listing + fix VLV index usage
Diffstat (limited to 'program/lib/Roundcube/rcube_ldap_generic.php')
-rw-r--r--program/lib/Roundcube/rcube_ldap_generic.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/program/lib/Roundcube/rcube_ldap_generic.php b/program/lib/Roundcube/rcube_ldap_generic.php
index e28426a4e..451fb0c4f 100644
--- a/program/lib/Roundcube/rcube_ldap_generic.php
+++ b/program/lib/Roundcube/rcube_ldap_generic.php
@@ -835,15 +835,15 @@ class rcube_ldap_generic
// get vlv config
$vlv_config = $this->_read_vlv_config();
- if ($vlv = $this->$vlv_config[$base_dn]) {
+ if ($vlv = $vlv_config[$base_dn]) {
$this->_debug("D: Found a VLV for base_dn: " . $base_dn);
- if ($vlv['filter'] == $filter) {
+ if ($vlv['filter'] == strtolower($filter)) {
$this->_debug("D: Filter matches");
if ($vlv['scope'] == $scope) {
// Not passing any sort attributes means you don't care
if (empty($sort_attrs) || in_array($sort_attrs, $vlv['sort'])) {
- return $vlv['sort'];
+ return $vlv['sort'][0];
}
}
else {
@@ -909,7 +909,7 @@ class rcube_ldap_generic
$this->vlv_config[$vlv_search_attrs['vlvbase']] = array(
'scope' => self::scopeint2str($vlv_search_attrs['vlvscope']),
- 'filter' => $vlv_search_attrs['vlvfilter'],
+ 'filter' => strtolower($vlv_search_attrs['vlvfilter']),
'sort' => $_vlv_sort,
);
}
@@ -919,6 +919,8 @@ class rcube_ldap_generic
$this->cache->set('vlvconfig', $this->vlv_config);
$this->_debug("D: Refreshed VLV config: " . var_export($this->vlv_config, true));
+
+ return $this->vlv_config;
}