summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-10-18 12:31:57 +0200
committerJulius Härtl <jus@bitgrid.net>2018-10-30 10:19:34 +0100
commit8b92a6c9cb0e4dea84aa0bfac75ad05c358d0b23 (patch)
tree5794db389b8573aa2b54720fd967cb5874c523c7 /apps/dav
parent06d8438fdab04371532d5bbf7f482bf3fca7c526 (diff)
downloadnextcloud-server-8b92a6c9cb0e4dea84aa0bfac75ad05c358d0b23.tar.gz
nextcloud-server-8b92a6c9cb0e4dea84aa0bfac75ad05c358d0b23.zip
Add type of properties to address book results
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CardDAV/AddressBookImpl.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php
index a592b9f0888..e9946e65aba 100644
--- a/apps/dav/lib/CardDAV/AddressBookImpl.php
+++ b/apps/dav/lib/CardDAV/AddressBookImpl.php
@@ -255,7 +255,13 @@ class AddressBookImpl implements IAddressBook {
$result[$property->name] = [];
}
- $result[$property->name][] = $property->getValue();
+ $type = $this->getTypeFromProperty($property);
+ if ($type !== null) {
+ $result[$property->name][$type] = $property->getValue();
+ } else {
+ $result[$property->name][] = $property->getValue();
+ }
+
} else {
$result[$property->name] = $property->getValue();