summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-04-17 09:12:06 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-04-17 09:38:47 +0200
commit29541322c1ce6eed2d43a93172fafcf22c0c54ff (patch)
tree9bf57330f98d777cb607941feac6c73dcd5cb5f0 /apps/dav/lib
parenta8809f079b47f30e9fff5a8b7ffb4a7229de22a3 (diff)
downloadnextcloud-server-29541322c1ce6eed2d43a93172fafcf22c0c54ff.tar.gz
nextcloud-server-29541322c1ce6eed2d43a93172fafcf22c0c54ff.zip
Update list of multiple properties
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CardDAV/AddressBookImpl.php15
1 files changed, 2 insertions, 13 deletions
diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php
index c63955202f4..5e355611c11 100644
--- a/apps/dav/lib/CardDAV/AddressBookImpl.php
+++ b/apps/dav/lib/CardDAV/AddressBookImpl.php
@@ -240,6 +240,7 @@ class AddressBookImpl implements IAddressBook {
*
* @param string $uri
* @param VCard $vCard
+ * @param boolean $withTypes (optional) return the values as arrays of value/type pairs
* @return array
*/
protected function vCard2Array($uri, VCard $vCard, $withTypes = false) {
@@ -259,19 +260,7 @@ class AddressBookImpl implements IAddressBook {
]) . '?photo';
$result['PHOTO'] = 'VALUE=uri:' . $url;
- } elseif ($property->name === 'X-SOCIALPROFILE') {
- $type = $this->getTypeFromProperty($property);
-
- // Type is the social network, when it's empty we don't need this.
- if ($type !== null) {
- if (!isset($result[$property->name])) {
- $result[$property->name] = [];
- }
- $result[$property->name][$type] = $property->getValue();
- }
-
- // The following properties can be set multiple times
- } elseif (in_array($property->name, ['CLOUD', 'EMAIL', 'IMPP', 'TEL', 'URL', 'X-ADDRESSBOOKSERVER-MEMBER'])) {
+ } elseif (in_array($property->name, ['URL', 'GEO', 'CLOUD', 'ADR', 'EMAIL', 'IMPP', 'TEL', 'X-SOCIALPROFILE', 'RELATED', 'LANG', 'X-ADDRESSBOOKSERVER-MEMBER'])) {
if (!isset($result[$property->name])) {
$result[$property->name] = [];
}