REST API, do NOT take "Sync all in one addressbook" preference into account, but store in given AB

This commit is contained in:
Ralf Becker 2021-09-28 11:33:50 +02:00
parent 643f1cf7c4
commit 0c4b719c5b

View File

@ -760,10 +760,10 @@ class addressbook_groupdav extends Api\CalDAV\Handler
} }
else else
{ {
$contact['carddav_name'] = $id; $contact['carddav_name'] = (!empty($id) ? basename($id, '.vcf') : $contact['uid']).'.vcf';
// only set owner, if user is explicitly specified in URL (check via prefix, NOT for /addressbook/) or sync-all-in-one!) // only set owner, if user is explicitly specified in URL (check via prefix, NOT for /addressbook/) or sync-all-in-one!)
if ($prefix && !in_array('O',$this->home_set_pref) && $user) if ($prefix && ($is_json || !in_array('O',$this->home_set_pref)) && $user)
{ {
$contact['owner'] = $user; $contact['owner'] = $user;
} }