From 2c9949f362af97aa93077b196cabbd4c957fc073 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 28 Sep 2021 11:33:50 +0200 Subject: [PATCH] REST API, do NOT take "Sync all in one addressbook" preference into account, but store in given AB --- addressbook/inc/class.addressbook_groupdav.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index 019abb26d2..56146fc509 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -760,10 +760,10 @@ class addressbook_groupdav extends Api\CalDAV\Handler } 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!) - 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; }