Skip to content

Commit 6575263

Browse files
authored
Merge pull request #100 from matidau/radicale-addressbook-vcard-content-type
Radicale ignore vcard getcontenttype if Address Book collection
2 parents 94270c5 + 374bbe0 commit 6575263

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/include/z_carddav.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,10 @@ private function simplify($response, $include_vcards = true, $remove_duplicates
657657

658658
foreach ($xml->response as $response) {
659659
if (isset($response->propstat)) {
660-
if ((strlen($this->url_vcard_extension) > 0 && preg_match('/'.$this->url_vcard_extension.'/', $response->href) &&
660+
if ((((strlen($this->url_vcard_extension) > 0 && preg_match('/'.$this->url_vcard_extension.'/', $response->href))
661+
|| preg_match('/vcard/', $response->propstat->prop->getcontenttype)) &&
661662
!(isset($response->propstat->prop->resourcetype) && isset($response->propstat->prop->resourcetype->addressbook)))
662-
|| preg_match('/vcard/', $response->propstat->prop->getcontenttype) || isset($response->propstat->prop->{'address-data'}) || isset($response->propstat->prop->{'addressbook-data'})) {
663+
|| isset($response->propstat->prop->{'address-data'}) || isset($response->propstat->prop->{'addressbook-data'})) {
663664
// It's a vcard
664665
$id = basename($response->href);
665666
$id = str_replace($this->url_vcard_extension, null, $id);

0 commit comments

Comments
 (0)