mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
fix bug #880, there was no $root parameter passed to the VObject/Parameter creation
This commit is contained in:
parent
f92f6a1deb
commit
75bbf040e4
@ -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) {
|
||||
protected function updateProperty(&$property, $importEntry, $value, $root = null) {
|
||||
if (isset($property) && isset($importEntry) && isset($value)) {
|
||||
if (isset($importEntry->vcard_entry)) {
|
||||
if (isset($importEntry->vcard_entry['type'])) {
|
||||
@ -66,7 +66,7 @@ abstract class ImportConnector {
|
||||
}
|
||||
if (isset($importEntry->vcard_entry->additional_property)) {
|
||||
foreach ($importEntry->vcard_entry->additional_property as $additionalProperty) {
|
||||
$property->parameters[] = new \Sabre\VObject\Parameter(''.$additionalProperty['name'], ''.$additionalProperty['value']);
|
||||
$property->parameters[] = new \Sabre\VObject\Parameter($root, ''.$additionalProperty['name'], ''.$additionalProperty['value']);
|
||||
}
|
||||
}
|
||||
if (isset($importEntry->vcard_entry['prefix'])) {
|
||||
|
@ -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));
|
||||
$this->updateProperty($property, $importEntry, trim($oneValue), $vcard);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$property = $this->getOrCreateVCardProperty($vcard, $importEntry->vcard_entry);
|
||||
$this->updateProperty($property, $importEntry, trim($oneValue));
|
||||
$this->updateProperty($property, $importEntry, trim($oneValue), $vcard);
|
||||
}
|
||||
}
|
||||
} else if (isset($element[$i]) && isset($title[$i])) {
|
||||
|
@ -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);
|
||||
$this->updateProperty($property, $importEntry, $value, $dest);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
$this->updateProperty($property, $importEntry, $value, $dest);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
$this->updateProperty($property, $importEntry, trim($oneValue), $dest);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$property = $this->getOrCreateVCardProperty($dest, $importEntry->vcard_entry);
|
||||
$this->updateProperty($property, $importEntry, $sourceProperty->getValue());
|
||||
$this->updateProperty($property, $importEntry, $sourceProperty->getValue(), $dest);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user