summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--program/lib/Roundcube/rcube_csv2vcard.php5
-rw-r--r--tests/src/Csv2vcard/gmail.csvbin3760 -> 3778 bytes
-rw-r--r--tests/src/Csv2vcard/gmail.vcf2
4 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3a70bd0d0..09835e065 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,7 @@ CHANGELOG Roundcube Webmail
===========================
- Fix drag-n-drop to folders expanded while dragging (#1490157)
+- Fix import of multiple contact groups from Google-csv format (#1490159)
RELEASE 1.1-beta
----------------
diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php
index b7d159178..802ca730d 100644
--- a/program/lib/Roundcube/rcube_csv2vcard.php
+++ b/program/lib/Roundcube/rcube_csv2vcard.php
@@ -584,11 +584,14 @@ class rcube_csv2vcard
if (!empty($contact['groups'])) {
// categories/groups separator in vCard is ',' not ';'
+ $contact['groups'] = str_replace(',', '', $contact['groups']);
$contact['groups'] = str_replace(';', ',', $contact['groups']);
- // remove "* " added by GMail
if (!empty($this->gmail_map)) {
+ // remove "* " added by GMail
$contact['groups'] = str_replace('* ', '', $contact['groups']);
+ // replace strange delimiter
+ $contact['groups'] = str_replace(' ::: ', ',', $contact['groups']);
}
}
diff --git a/tests/src/Csv2vcard/gmail.csv b/tests/src/Csv2vcard/gmail.csv
index 9f67fe9f5..1de3033e7 100644
--- a/tests/src/Csv2vcard/gmail.csv
+++ b/tests/src/Csv2vcard/gmail.csv
Binary files differ
diff --git a/tests/src/Csv2vcard/gmail.vcf b/tests/src/Csv2vcard/gmail.vcf
index 5337d7e63..2a56311d3 100644
--- a/tests/src/Csv2vcard/gmail.vcf
+++ b/tests/src/Csv2vcard/gmail.vcf
@@ -5,7 +5,7 @@ N:Lastname;Firstname;Middle;Prefix;Suffix
NICKNAME:nick
BDAY;VALUE=date:1975-12-12
NOTE:note"note
-CATEGORIES:My Contacts
+CATEGORIES:My Contacts,Test
EMAIL;TYPE=INTERNET;TYPE=HOME:home@aaa.pl
EMAIL;TYPE=INTERNET;TYPE=WORK:work@email.pl
TEL;TYPE=pager:pager