summaryrefslogtreecommitdiff
path: root/program/steps/addressbook
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-12-04 17:05:42 +0000
committerthomascube <thomas@roundcube.net>2011-12-04 17:05:42 +0000
commitf47d5e20891305d4c40f4f500318cfcbea4d2135 (patch)
treea44393ecffa0d4200f382156e4592c9f5d248b70 /program/steps/addressbook
parente237eec8468e99b65a9160a0a3f07529b92725e3 (diff)
Apply fixes r5539 and r5540 to release branch
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r--program/steps/addressbook/save.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index 0a2d6dbff..03f6671e6 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -50,10 +50,12 @@ foreach ($GLOBALS['CONTACT_COLTYPES'] as $col => $colprop) {
foreach ((array)$vals as $i => $val)
$values[$i][$childcol] = $val;
}
- $subtypes = get_input_value('_subtype_' . $col, RCUBE_INPUT_POST);
- foreach ($subtypes as $i => $subtype)
+ $subtypes = isset($_REQUEST['_subtype_' . $col]) ? (array)get_input_value('_subtype_' . $col, RCUBE_INPUT_POST) : array('');
+ foreach ($subtypes as $i => $subtype) {
+ $suffix = $subtype ? ':'.$subtype : '';
if ($values[$i])
- $a_record[$col.':'.$subtype][] = $values[$i];
+ $a_record[$col.$suffix][] = $values[$i];
+ }
}
// assign values and subtypes
else if (is_array($_POST[$fname])) {