summaryrefslogtreecommitdiff
path: root/program/include/rcube_ldap.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-10-30 16:33:09 +0000
committerthomascube <thomas@roundcube.net>2011-10-30 16:33:09 +0000
commit3ac5cdb4acc4b82c0b306df4e64081a7f7e4213d (patch)
tree5c437d5e7e79301551fd080fb63be18fb599ccf8 /program/include/rcube_ldap.php
parent2429cfde7887d1c92369cba972305a7f9ddddb18 (diff)
Also merge properties of child cols of composite address book fields + remove undefined fields from template
Diffstat (limited to 'program/include/rcube_ldap.php')
-rw-r--r--program/include/rcube_ldap.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 5563475ee..a81632545 100644
--- a/program/include/rcube_ldap.php
+++ b/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);