diff options
-rw-r--r-- | lib/kolab_api_service.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php index f19486a..0c7182a 100644 --- a/lib/kolab_api_service.php +++ b/lib/kolab_api_service.php @@ -360,7 +360,13 @@ abstract class kolab_api_service if (empty($attribs[$key])) { $result[$key] = $type_attrs['fields'][$key] = $value; } else { - $result[$key] = $attribs[$key] = $value; + if (!empty($type_attrs['auto_form_fields'][$key]['optional']) && + $type_attrs['auto_form_fields'][$key]['type'] == "list") { + + $result[$key] = array_unique(array_merge((array)$attribs[$key], (array)$value)); + } else { + $result[$key] = $attribs[$key] = $value; + } } } } |