summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_ldap.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-10-30 16:33:09 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-10-30 16:33:09 +0000
commit037f21fdf5d253a57afc49c8df5c706656713469 (patch)
tree555596dcdbf174ca3479f147b114b7b1978da512 /roundcubemail/program/include/rcube_ldap.php
parentfd068c05a7ff1498d947ceacbde6d8cf7f060ba9 (diff)
Also merge properties of child cols of composite address book fields + remove undefined fields from template
git-svn-id: https://svn.roundcube.net/trunk@5379 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_ldap.php')
-rw-r--r--roundcubemail/program/include/rcube_ldap.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_ldap.php b/roundcubemail/program/include/rcube_ldap.php
index 5563475ee..a81632545 100644
--- a/roundcubemail/program/include/rcube_ldap.php
+++ b/roundcubemail/program/include/rcube_ldap.php
@@ -119,9 +119,13 @@ class rcube_ldap extends rcube_addressbook
// support for composite address
if ($this->fieldmap['street'] && $this->fieldmap['locality']) {
- $this->coltypes['address'] = array('limit' => max(1, $this->coltypes['locality']['limit']), 'subtypes' => $this->coltypes['locality']['subtypes']);
- foreach (array('street','locality','zipcode','region','country') as $childcol)
- unset($this->coltypes[$childcol]); // remove address child col from global coltypes list
+ $this->coltypes['address'] = array('limit' => max(1, $this->coltypes['locality']['limit']), 'subtypes' => $this->coltypes['locality']['subtypes'], 'childs' => array());
+ foreach (array('street','locality','zipcode','region','country') as $childcol) {
+ if ($this->fieldmap[$childcol]) {
+ $this->coltypes['address']['childs'][$childcol] = array('type' => 'text');
+ unset($this->coltypes[$childcol]); // remove address child col from global coltypes list
+ }
+ }
}
else if ($this->coltypes['address'])
$this->coltypes['address'] = array('type' => 'textarea', 'childs' => null, 'limit' => 1, 'size' => 40);