summaryrefslogtreecommitdiff
path: root/program/steps/addressbook
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-05-26 18:05:40 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-05-26 18:05:40 +0200
commite1a3caf659c01374d7039ee4b3fc31099936f2ba (patch)
treeba64f34eee14ec58ab70596d83bb0ffceac53bf5 /program/steps/addressbook
parentb3e3422e9fc8418732574120b8ae82a0a25ca628 (diff)
Also display contact properties with unknown subtypes
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r--program/steps/addressbook/func.inc21
1 files changed, 6 insertions, 15 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index d416cc14f..3db2409e8 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -551,22 +551,13 @@ function rcmail_contact_form($form, $record, $attrib = null)
// iterate over possible subtypes and collect values with their subtype
if (is_array($colprop['subtypes'])) {
$values = $subtypes = array();
- foreach ($colprop['subtypes'] as $i => $st) {
- $newval = false;
- if ($record[$field.':'.$st]) {
- $subtypes[count($values)] = $st;
- $newval = $record[$field.':'.$st];
- }
- else if ($i == 0 && $record[$field]) {
- $subtypes[count($values)] = $st;
- $newval = $record[$field];
- }
- if ($newval !== false) {
- if (is_array($newval) && isset($newval[0]))
- $values = array_merge($values, $newval);
- else
- $values[] = $newval;
+ foreach (rcube_addressbook::get_col_values($field, $record) as $st => $vals) {
+ foreach((array)$vals as $value) {
+ $i = count($values);
+ $subtypes[$i] = $st;
+ $values[$i] = $value;
}
+ // TODO: add $st to $select_subtype if missing ?
}
}
else {