summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <tb@woodcrest.local>2013-10-10 16:39:20 (GMT)
committerThomas <tb@woodcrest.local>2013-10-10 16:39:20 (GMT)
commitdc65d4b9ca42b10a924fa1b62942301299497548 (patch)
treefe2fc3ea417a3371efa7e3d3b7f8cbaa97dd7acc
parent8977774b0fc6fc47d143ea5eec74c40cc1ff169e (diff)
downloadiRony-dc65d4b9ca42b10a924fa1b62942301299497548.tar.gz
Support simple address type parameters
-rw-r--r--lib/Kolab/CardDAV/ContactsBackend.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Kolab/CardDAV/ContactsBackend.php b/lib/Kolab/CardDAV/ContactsBackend.php
index 31a1828..3be0d4c 100644
--- a/lib/Kolab/CardDAV/ContactsBackend.php
+++ b/lib/Kolab/CardDAV/ContactsBackend.php
@@ -835,8 +835,8 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
break;
case 'ADR':
- $type = $prop->offsetGet('type');
- $adr = array('type' => strtolower($type));
+ $type = $prop->offsetGet('type') ?: $prop->parameters[0];
+ $adr = array('type' => strtolower($type->value ?: $type->name));
list(,, $adr['street'], $adr['locality'], $adr['region'], $adr['code'], $adr['country']) = $prop->getParts();
$contact['address'][] = $adr;
break;