diff options
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/addressbook/export.inc | 4 | ||||
-rw-r--r-- | program/steps/addressbook/import.inc | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc index 04b98a308..f890aca69 100644 --- a/program/steps/addressbook/export.inc +++ b/program/steps/addressbook/export.inc @@ -77,7 +77,9 @@ while ($result && ($row = $result->next())) { } // copy values into vcard object else { - $vcard = new rcube_vcard($row['vcard']); + $vcard = new rcube_vcard(); + $vcard->extend_fieldmap($CONTACTS->vcard_map); + $vcard->load($row['vcard']); $vcard->reset(); foreach ($row as $key => $values) { diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc index 12a8d6b9b..1b9aea18a 100644 --- a/program/steps/addressbook/import.inc +++ b/program/steps/addressbook/import.inc @@ -138,7 +138,10 @@ if ($_FILES['_file']['tmp_name'] && is_uploaded_file($_FILES['_file']['tmp_name' $CONTACTS = $RCMAIL->get_address_book($target, true); // let rcube_vcard do the hard work :-) - $vcards = rcube_vcard::import(file_get_contents($_FILES['_file']['tmp_name'])); + $vcard_o = new rcube_vcard(); + $vcard_o->extend_fieldmap($CONTACTS->vcard_map); + + $vcards = $vcard_o->import(file_get_contents($_FILES['_file']['tmp_name'])); // no vcards detected if (!count($vcards)) { |