diff --git a/lib/connector/importconnector.php b/lib/connector/importconnector.php index f340c91d..35734e43 100644 --- a/lib/connector/importconnector.php +++ b/lib/connector/importconnector.php @@ -58,7 +58,7 @@ abstract class ImportConnector { * @param $importEntry the entry configuration to update in SimpleXml format * @value the value to update */ - protected function updateProperty(&$property, $importEntry, $value, $root = null) { + protected function updateProperty(&$property, $importEntry, $value) { if (isset($property) && isset($importEntry) && isset($value)) { if (isset($importEntry->vcard_entry)) { if (isset($importEntry->vcard_entry['type'])) { @@ -86,17 +86,10 @@ abstract class ImportConnector { $property->setValue(implode($separator, $vArray)); } else { if (isset($importEntry->vcard_entry['value'])) { - $property->add('TYPE', StringUtil::convertToUTF8($value)); + $property->add('TYPE', StringUtil::convertToUTF8($value)); } else { - $curVal = $property->getValue(); - if ($curVal != '') { - if (!is_array($curVal)) { - $curVal = array($curVal); - } - $curVal[] = StringUtil::convertToUTF8($value); - } else { - $curVal = StringUtil::convertToUTF8($value); - } + $curVal = $property->getParts(); + $curVal[] = StringUtil::convertToUTF8($value); $property->setValue($curVal); } } diff --git a/lib/connector/importcsvconnector.php b/lib/connector/importcsvconnector.php index 4410af1f..fa2d7a1d 100644 --- a/lib/connector/importcsvconnector.php +++ b/lib/connector/importcsvconnector.php @@ -158,12 +158,12 @@ class ImportCsvConnector extends ImportConnector { $vcard->add($property); } else { $property = $this->getOrCreateVCardProperty($vcard, $importEntry->vcard_entry); - $this->updateProperty($property, $importEntry, trim($oneValue), $vcard); + $this->updateProperty($property, $importEntry, trim($oneValue)); } } } else { $property = $this->getOrCreateVCardProperty($vcard, $importEntry->vcard_entry); - $this->updateProperty($property, $importEntry, trim($oneValue), $vcard); + $this->updateProperty($property, $importEntry, trim($oneValue)); } } } else if (isset($element[$i]) && isset($title[$i])) { diff --git a/lib/connector/importldifconnector.php b/lib/connector/importldifconnector.php index 94532323..66bc2bfa 100644 --- a/lib/connector/importldifconnector.php +++ b/lib/connector/importldifconnector.php @@ -163,7 +163,7 @@ class ImportLdifConnector extends ImportConnector{ if (isset($importEntry['image']) && $importEntry['image'] == "true") { $this->updateImageProperty($property, $value); } else { - $this->updateProperty($property, $importEntry, $value, $dest); + $this->updateProperty($property, $importEntry, $value); } } } @@ -172,7 +172,7 @@ class ImportLdifConnector extends ImportConnector{ if (isset($importEntry['image']) && $importEntry['image'] == "true") { $this->updateImageProperty($property, $value); } else { - $this->updateProperty($property, $importEntry, $value, $dest); + $this->updateProperty($property, $importEntry, $value); } } } diff --git a/lib/connector/importvcardconnector.php b/lib/connector/importvcardconnector.php index e9a12803..961ddb45 100644 --- a/lib/connector/importvcardconnector.php +++ b/lib/connector/importvcardconnector.php @@ -133,12 +133,12 @@ class ImportVCardConnector extends ImportConnector{ $dest->add($property); } else { $property = $this->getOrCreateVCardProperty($dest, $importEntry->vcard_entry); - $this->updateProperty($property, $importEntry, trim($oneValue), $dest); + $this->updateProperty($property, $importEntry, trim($oneValue)); } } } else { $property = $this->getOrCreateVCardProperty($dest, $importEntry->vcard_entry); - $this->updateProperty($property, $importEntry, $sourceProperty->getValue(), $dest); + $this->updateProperty($property, $importEntry, $sourceProperty->getValue()); } } } else {