summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-16 12:00:35 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-16 12:00:35 +0200
commitfb001f851f60e99b4ba9d2f837a76a46dfd3fd5f (patch)
tree771f14b898e81bb9f044a129870587b8706bf5f4
parent287eff030a7c6437495dc15badb125640cc4c3d3 (diff)
Force at least one subtype of address to be specified.
Fixes issue where contact address wasn't displayed at all.
-rw-r--r--program/include/rcube_ldap.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index dbab0fd06..ad2ccddeb 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -139,6 +139,11 @@ class rcube_ldap extends rcube_addressbook
unset($this->coltypes[$childcol]); // remove address child col from global coltypes list
}
}
+
+ // at least one address type must be specified
+ if (empty($this->coltypes['address']['subtypes'])) {
+ $this->coltypes['address']['subtypes'] = array('home');
+ }
}
else if ($this->coltypes['address']) {
$this->coltypes['address'] += array('type' => 'textarea', 'childs' => null, 'size' => 40);