diff --git a/turba/docs/CHANGES b/turba/docs/CHANGES
index ea13cecdf48..f41b095b63c 100644
--- a/turba/docs/CHANGES
+++ b/turba/docs/CHANGES
@@ -2,6 +2,7 @@
v4.2.0-git
----------
+[jan] Fix importing vCard fields with lowercase TYPE attributes (Bug #13006).
[jan] Don't remove missing contacts from distributions lists in Kolab backends
(Bug #12861).
[jan] Support binary fields (photos) in Kolab backends.
diff --git a/turba/lib/Driver.php b/turba/lib/Driver.php
index bec542628d9..8a780dde94b 100644
--- a/turba/lib/Driver.php
+++ b/turba/lib/Driver.php
@@ -2226,6 +2226,9 @@ public function toHash(Horde_Icalendar_Vcard $vcard)
if (!is_array($item['params']['TYPE'])) {
$item['params']['TYPE'] = array($item['params']['TYPE']);
}
+ foreach ($item['params']['TYPE'] as &$type) {
+ $type = Horde_String::upper($type);
+ }
// For vCard 3.0.
if (in_array('CELL', $item['params']['TYPE'])) {
if (in_array('HOME', $item['params']['TYPE']) &&
@@ -2320,6 +2323,9 @@ public function toHash(Horde_Icalendar_Vcard $vcard)
if (!is_array($item['params']['TYPE'])) {
$item['params']['TYPE'] = array($item['params']['TYPE']);
}
+ foreach ($item['params']['TYPE'] as &$type) {
+ $type = Horde_String::upper($type);
+ }
if (in_array('HOME', $item['params']['TYPE']) &&
(!isset($hash['homeEmail']) ||
in_array('PREF', $item['params']['TYPE']))) {
@@ -2478,7 +2484,8 @@ public function toHash(Horde_Icalendar_Vcard $vcard)
// Ensure we have an 'email' field since we don't know for sure what
// the source is, therefore we don't know the mappings available. Fixes
- // importing vCards that have all EMAIL properties with a TYPE attribute.
+ // importing vCards that have all EMAIL properties with a TYPE
+ // attribute.
// See Bug: 12955
if (!isset($hash['email'])) {
if (!empty($hash['homeEmail'])) {
diff --git a/turba/package.xml b/turba/package.xml
index d0d8fcb000e..90ff5923c30 100644
--- a/turba/package.xml
+++ b/turba/package.xml
@@ -40,6 +40,7 @@
ASL
+* [jan] Fix importing vCard fields with lowercase TYPE attributes (Bug #13006).
* [jan] Don't remove missing contacts from distributions lists in Kolab backends (Bug #12861).
* [jan] Support binary fields (photos) in Kolab backends.
* [mms] Allow tagging system to be disabled via configuration option.
@@ -1777,6 +1778,7 @@
2013-08-15
ASL
+* [jan] Fix importing vCard fields with lowercase TYPE attributes (Bug #13006).
* [jan] Don't remove missing contacts from distributions lists in Kolab backends (Bug #12861).
* [jan] Support binary fields (photos) in Kolab backends.
* [mms] Allow tagging system to be disabled via configuration option.