Aleksander Machniak
2013-11-07 5983ee0f183d8d8b13cb757aff16402fa71420fd
Fix categories/groups import from csv
2 files modified
10 ■■■■■ changed files
program/lib/Roundcube/rcube_csv2vcard.php 10 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_vcard.php patch | view | raw | blame | history
program/lib/Roundcube/rcube_csv2vcard.php
@@ -47,7 +47,7 @@
        //'business_street_2'     => '',
        //'business_street_3'     => '',
        'car_phone'             => 'phone:car',
        'categories'            => 'categories',
        'categories'            => 'groups',
        //'children'              => '',
        'company'               => 'organization',
        //'company_main_phone'    => '',
@@ -146,6 +146,9 @@
        'work_title'            => 'jobtitle',
        'work_zip'              => 'zipcode:work',
        'group'                 => 'groups',
        // GMail
        'groups'                => 'groups',
    );
    /**
@@ -427,6 +430,11 @@
            $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])) {
program/lib/Roundcube/rcube_vcard.php