From 09cc5a8549625572c9d9064fd0780d57d862f9b2 Mon Sep 17 00:00:00 2001 From: Stefan Schlott Date: Sat, 8 Aug 2015 19:49:57 +0200 Subject: [PATCH] Ignore elements of resourcetype collection --- carddav.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/carddav.php b/carddav.php index e5ef0b54..0e5ffdca 100644 --- a/carddav.php +++ b/carddav.php @@ -552,7 +552,8 @@ private function simplify($response, $include_vcards = true) if (!empty($xml->response)) { foreach ($xml->response as $response) { - if (preg_match('/vcard/', $response->propstat->prop->getcontenttype) || preg_match('/vcf/', $response->href)) { + if ((preg_match('/vcard/', $response->propstat->prop->getcontenttype) || preg_match('/vcf/', $response->href)) && + !$response->propstat->prop->resourcetype->collection) { $id = basename($response->href); $id = str_replace($this->url_vcard_extension, null, $id);