From 166718a22cb2185978a5a998111784bc637c1990 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 18 May 2021 14:02:51 +0200 Subject: [PATCH] remove config allowing to immediately delete contacts (as it's required for sync) --- addressbook/inc/class.addressbook_groupdav.inc.php | 10 +++------- addressbook/templates/default/config.xet | 3 +-- api/src/Contacts.php | 3 +-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index b8c1738584..313fdb4ab9 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -920,14 +920,10 @@ class addressbook_groupdav extends Api\CalDAV\Handler 'addressbook-multiget' => Api\CalDAV::mkprop('supported-report',array( Api\CalDAV::mkprop('report',array( Api\CalDAV::mkprop(Api\CalDAV::CARDDAV,'addressbook-multiget',''))))), + 'sync-collection' => Api\CalDAV::mkprop('supported-report',array( + Api\CalDAV::mkprop('report',array( + Api\CalDAV::mkprop('sync-collection',''))))), ); - // only advertice rfc 6578 sync-collection report, if "delete-prevention" is switched on (deleted entries get marked deleted but not actualy deleted - if ($GLOBALS['egw_info']['server']['history']) - { - $props['supported-report-set']['sync-collection'] = Api\CalDAV::mkprop('supported-report',array( - Api\CalDAV::mkprop('report',array( - Api\CalDAV::mkprop('sync-collection',''))))); - } return $props; } diff --git a/addressbook/templates/default/config.xet b/addressbook/templates/default/config.xet index cae9f0d790..fe87f920b8 100644 --- a/addressbook/templates/default/config.xet +++ b/addressbook/templates/default/config.xet @@ -101,8 +101,7 @@ diff --git a/api/src/Contacts.php b/api/src/Contacts.php index b259a269c8..f3835f5749 100755 --- a/api/src/Contacts.php +++ b/api/src/Contacts.php @@ -848,10 +848,9 @@ class Contacts extends Contacts\Storage if ($this->check_perms(Acl::DELETE,$c,$deny_account_delete)) { if (!($old = $this->read($id))) return false; - // check if we only mark contacts as deleted, or really delete them // already marked as deleted item and accounts are always really deleted // we cant mark accounts as deleted, as no such thing exists for accounts! - if ($old['owner'] && $this->delete_history != '' && $old['tid'] != self::DELETED_TYPE) + if ($old['owner'] && $old['tid'] !== self::DELETED_TYPE) { $delete = $old; $delete['tid'] = self::DELETED_TYPE;