summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/import.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-03 09:20:52 +0000
committeralecpl <alec@alec.pl>2011-08-03 09:20:52 +0000
commit4d4a2fa32edffcca91822fe82363b71372048286 (patch)
tree3ab5cf1447e335dd094430b198cbb34832ec3f25 /program/steps/addressbook/import.inc
parent34854b63ee18d7b1a8b95d138460504e5d1c3f67 (diff)
- Added possibility to extend rcube_vcard's fieldmap
- Skip empty values in vCard export
Diffstat (limited to 'program/steps/addressbook/import.inc')
-rw-r--r--program/steps/addressbook/import.inc5
1 files changed, 4 insertions, 1 deletions
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)) {