diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-12-04 16:57:40 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-12-04 16:57:40 +0000 |
| commit | 7fa691e4423a5c86c01c6f794732bad204c2c286 (patch) | |
| tree | 649fc56efe19b40a4e6b250bdb13cd272c4279f1 /roundcubemail/program | |
| parent | ab3b29154427c22a366efafc1e25b7676a6c3338 (diff) | |
Fix saving of composite address fields without subtype
git-svn-id: https://svn.roundcube.net/trunk@5540 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/steps/addressbook/save.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/addressbook/save.inc b/roundcubemail/program/steps/addressbook/save.inc index 0a2d6dbff..03f6671e6 100644 --- a/roundcubemail/program/steps/addressbook/save.inc +++ b/roundcubemail/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])) { |
