From 374bbe0262d8094d7454a15f666af6fd9ef075c0 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:07:07 +1000 Subject: [PATCH] Radicale ignore vcard getcontenttype if Address Book collection --- src/include/z_carddav.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/z_carddav.php b/src/include/z_carddav.php index 69058e91..4227d642 100644 --- a/src/include/z_carddav.php +++ b/src/include/z_carddav.php @@ -657,9 +657,10 @@ private function simplify($response, $include_vcards = true, $remove_duplicates foreach ($xml->response as $response) { if (isset($response->propstat)) { - if ((strlen($this->url_vcard_extension) > 0 && preg_match('/'.$this->url_vcard_extension.'/', $response->href) && + if ((((strlen($this->url_vcard_extension) > 0 && preg_match('/'.$this->url_vcard_extension.'/', $response->href)) + || preg_match('/vcard/', $response->propstat->prop->getcontenttype)) && !(isset($response->propstat->prop->resourcetype) && isset($response->propstat->prop->resourcetype->addressbook))) - || preg_match('/vcard/', $response->propstat->prop->getcontenttype) || isset($response->propstat->prop->{'address-data'}) || isset($response->propstat->prop->{'addressbook-data'})) { + || isset($response->propstat->prop->{'address-data'}) || isset($response->propstat->prop->{'addressbook-data'})) { // It's a vcard $id = basename($response->href); $id = str_replace($this->url_vcard_extension, null, $id);