From e1a3caf659c01374d7039ee4b3fc31099936f2ba Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Sun, 26 May 2013 12:05:40 -0400 Subject: [PATCH] Also display contact properties with unknown subtypes --- program/steps/addressbook/func.inc | 21 ++++++--------------- 1 files changed, 6 insertions(+), 15 deletions(-) diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index d416cc1..3db2409 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -551,22 +551,13 @@ // 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]; + 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; } - 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; - } + // TODO: add $st to $select_subtype if missing ? } } else { -- Gitblit v1.9.1