summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-01-04 10:58:00 +0000
committerthomascube <thomas@roundcube.net>2012-01-04 10:58:00 +0000
commitad8c9db557d367a8369381384d6cd8e52ccfe4de (patch)
tree5c4227883b1baf903471123a39662eef1195689a
parent19145d5de487de39e28a1603a4caa5dd639eb52a (diff)
Improve support for multiple composite address fields in LDAP directories
-rw-r--r--program/include/rcube_ldap.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 5c0bd00a5..c11bbb5e2 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -1320,12 +1320,13 @@ class rcube_ldap extends rcube_addressbook
if (!($value = $rec[$lf][$i]))
continue;
+ list($col, $subtype) = explode(':', $rf);
$out['_raw_attrib'][$lf][$i] = $value;
if ($rf == 'email' && $this->mail_domain && !strpos($value, '@'))
$out[$rf][] = sprintf('%s@%s', $value, $this->mail_domain);
- else if (in_array($rf, array('street','zipcode','locality','country','region')))
- $out['address'][$i][$rf] = $value;
+ else if (in_array($col, array('street','zipcode','locality','country','region')))
+ $out['address'.($subtype?':':'').$subtype][$i][$col] = $value;
else if ($rec[$lf]['count'] > 1)
$out[$rf][] = $value;
else