summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/addressbook/import.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-08-03 09:20:52 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-08-03 09:20:52 +0000
commitebc3457ab218f488e2789ef0af095cd88ec0b45c (patch)
tree53fe951a117a87afbf616ebd84dc2fe19386f371 /roundcubemail/program/steps/addressbook/import.inc
parent7a3dde3ba837b8449b3f352bc20843843d7f66e2 (diff)
- Added possibility to extend rcube_vcard's fieldmap
- Skip empty values in vCard export git-svn-id: https://svn.roundcube.net/trunk@5010 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/addressbook/import.inc')
-rw-r--r--roundcubemail/program/steps/addressbook/import.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/roundcubemail/program/steps/addressbook/import.inc b/roundcubemail/program/steps/addressbook/import.inc
index 12a8d6b9b..1b9aea18a 100644
--- a/roundcubemail/program/steps/addressbook/import.inc
+++ b/roundcubemail/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)) {