summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_csv2vcard.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-11-07 20:12:16 +0100
committerAleksander Machniak <alec@alec.pl>2013-11-07 20:12:16 +0100
commit5983ee0f183d8d8b13cb757aff16402fa71420fd (patch)
tree6a7c6a297ee3b0c1985efb1c53cfd043bedd090e /program/lib/Roundcube/rcube_csv2vcard.php
parent3433637cb94c0b27bf4cd9347dc7f19494314f25 (diff)
Fix categories/groups import from csv
Diffstat (limited to 'program/lib/Roundcube/rcube_csv2vcard.php')
-rw-r--r--program/lib/Roundcube/rcube_csv2vcard.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php
index 00e6d4e20..aa385dce4 100644
--- a/program/lib/Roundcube/rcube_csv2vcard.php
+++ b/program/lib/Roundcube/rcube_csv2vcard.php
@@ -47,7 +47,7 @@ class rcube_csv2vcard
//'business_street_2' => '',
//'business_street_3' => '',
'car_phone' => 'phone:car',
- 'categories' => 'categories',
+ 'categories' => 'groups',
//'children' => '',
'company' => 'organization',
//'company_main_phone' => '',
@@ -146,6 +146,9 @@ class rcube_csv2vcard
'work_title' => 'jobtitle',
'work_zip' => 'zipcode:work',
'group' => 'groups',
+
+ // GMail
+ 'groups' => 'groups',
);
/**
@@ -427,6 +430,11 @@ class rcube_csv2vcard
$contact['birthday'] = $contact['birthday-y'] .'-' .$contact['birthday-m'] . '-' . $contact['birthday-d'];
}
+ // categories/groups separator in vCard is ',' not ';'
+ if (!empty($contact['groups'])) {
+ $contact['groups'] = str_replace(';', ',', $contact['groups']);
+ }
+
// Empty dates, e.g. "0/0/00", "0000-00-00 00:00:00"
foreach (array('birthday', 'anniversary') as $key) {
if (!empty($contact[$key])) {