mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-28 10:24:11 +01:00
Merge pull request #1065 from gvde/fix-n-adr-import
Make sure to use arrays for structured elements N and ADR.
This commit is contained in:
commit
0ffe818aac
@ -83,9 +83,9 @@ abstract class ImportConnector {
|
||||
$separator=$importEntry->vcard_entry['separator'];
|
||||
}
|
||||
$position = $importEntry->vcard_entry['position'];
|
||||
$vArray = explode($separator, $property);
|
||||
$vArray = $property->getParts();
|
||||
$vArray[intval($position)] = StringUtil::convertToUTF8($value);
|
||||
$property->setValue(implode($separator, $vArray));
|
||||
$property->setParts($vArray);
|
||||
} else {
|
||||
if (isset($importEntry->vcard_entry['value'])) {
|
||||
$property->add('TYPE', StringUtil::convertToUTF8($value));
|
||||
@ -164,14 +164,14 @@ abstract class ImportConnector {
|
||||
$vcard->add($property);
|
||||
if ($importEntry['type']!=null) {
|
||||
$property->add('TYPE', StringUtil::convertToUTF8($importEntry['type']));
|
||||
switch ($importEntry['property']) {
|
||||
case "ADR":
|
||||
$property->setValue(";;;;;;");
|
||||
break;
|
||||
case "FN":
|
||||
$property->setValue(";;;;");
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch ($importEntry['property']) {
|
||||
case "ADR":
|
||||
$property->setValue(array('', '', '', '', '', '', ''));
|
||||
break;
|
||||
case "N":
|
||||
$property->setValue(array('', '', '', '', ''));
|
||||
break;
|
||||
}
|
||||
if ($importEntry['group']!=null) {
|
||||
$property->group = $importEntry['group'];
|
||||
|
Loading…
Reference in New Issue
Block a user