diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-03-06 13:16:01 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-03-06 13:17:14 +0100 |
commit | 532c10669be034d314b1906e8247339132f1ec61 (patch) | |
tree | 6db7aeebdca9b301cc25a6890237fa9f8e6a9707 /program/lib/Roundcube/rcube_ldap.php | |
parent | c70f26776ef2a539834caa04ca86a0f71ee80cee (diff) |
Support structured data for autocompletion results; map 'type' attribute to CSS class for autocomplete list items
Diffstat (limited to 'program/lib/Roundcube/rcube_ldap.php')
-rw-r--r-- | program/lib/Roundcube/rcube_ldap.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php index de3790e5c..55a64acec 100644 --- a/program/lib/Roundcube/rcube_ldap.php +++ b/program/lib/Roundcube/rcube_ldap.php @@ -95,8 +95,8 @@ class rcube_ldap extends rcube_addressbook if (empty($this->prop['groups']['scope'])) $this->prop['groups']['scope'] = 'sub'; // extend group objectclass => member attribute mapping - if (!empty($this->prop['groups']['class_member_attr'])) - $this->group_types = array_merge($this->group_types, $this->prop['groups']['class_member_attr']); + if (!empty($this->prop['groups']['event-panel-summary'])) + $this->group_types = array_merge($this->group_types, $this->prop['groups']['event-panel-summary']); // add group name attrib to the list of attributes to be fetched $fetch_attributes[] = $this->prop['groups']['name_attr']; @@ -1409,6 +1409,16 @@ class rcube_ldap extends rcube_addressbook $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++) { |