Aleksander Machniak
2013-04-30 609483d9f68f792ebf13441b3056118f4518fa7c
Support CSV import from Atmail (#1489045)
3 files modified
64 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_csv2vcard.php 46 ●●●●● patch | view | raw | blame | history
program/localization/en_US/csv2vcard.inc 17 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Support CSV import from Atmail (#1489045)
- Inlcude SQL query in the log on SQL error (#1489064)
- Fix handling untagged responses in IMAP FETCH - "could not load message" error (#1489074)
- Fix very small window size in Chrome (#1488931)
program/lib/Roundcube/rcube_csv2vcard.php
@@ -130,6 +130,23 @@
        'work_state'            => 'region:work',
        'home_city_short'       => 'locality:home',
        'home_state_short'      => 'region:home',
        // Atmail
        'date_of_birth'         => 'birthday',
        'email'                 => 'email:pref',
        'home_mobile'           => 'phone:cell',
        'home_zip'              => 'zipcode:home',
        'info'                  => 'notes',
        'user_photo'            => 'photo',
        'url'                   => 'website:homepage',
        'work_city'             => 'locality:work',
        'work_company'          => 'organization',
        'work_dept'             => 'departament',
        'work_fax'              => 'phone:work,fax',
        'work_mobile'           => 'phone:work,cell',
        'work_state'            => 'region:work',
        'work_title'            => 'jobtitle',
        'work_zip'              => 'zipcode:work',
    );
    /**
@@ -232,6 +249,27 @@
        //'work_address_2'    => "Work Address 2",
        'work_country'      => "Work Country",
        'work_zipcode'      => "Work ZipCode",
        // Atmail
        'date_of_birth'     => "Date of Birth",
        'email'             => "Email",
        //'email_2'         => "Email2",
        //'email_3'         => "Email3",
        //'email_4'         => "Email4",
        //'email_5'         => "Email5",
        'home_mobile'       => "Home Mobile",
        'home_zip'          => "Home Zip",
        'info'              => "Info",
        'user_photo'        => "User Photo",
        'url'               => "URL",
        'work_city'         => "Work City",
        'work_company'      => "Work Company",
        'work_dept'         => "Work Dept",
        'work_fax'          => "Work Fax",
        'work_mobile'       => "Work Mobile",
        'work_state'        => "Work State",
        'work_title'        => "Work Title",
        'work_zip'          => "Work Zip",
    );
    protected $local_label_map = array();
@@ -384,9 +422,13 @@
            $contact['birthday'] = $contact['birthday-y'] .'-' .$contact['birthday-m'] . '-' . $contact['birthday-d'];
        }
        // Empty dates, e.g. "0/0/00", "0000-00-00 00:00:00"
        foreach (array('birthday', 'anniversary') as $key) {
            if (!empty($contact[$key]) && $contact[$key] == '0/0/00') { // @TODO: localization?
                unset($contact[$key]);
            if (!empty($contact[$key])) {
                $date = preg_replace('/[0[:^word:]]/', '', $contact[$key]);
                if (empty($date)) {
                    unset($contact[$key]);
                }
            }
        }
program/localization/en_US/csv2vcard.inc
@@ -91,3 +91,20 @@
$map['work_address'] = "Work Address";
$map['work_country'] = "Work Country";
$map['work_zipcode'] = "Work ZipCode";
// Atmail
$map['date_of_birth'] = "Date of Birth";
$map['email'] = "Email";
$map['home_mobile'] = "Home Mobile";
$map['home_zip'] = "Home Zip";
$map['info'] = "Info";
$map['user_photo'] = "User Photo";
$map['url'] = "URL";
$map['work_city'] = "Work City";
$map['work_company'] = "Work Company";
$map['work_dept'] = "Work Dept";
$map['work_fax'] = "Work Fax";
$map['work_mobile'] = "Work Mobile";
$map['work_state'] = "Work State";
$map['work_title'] = "Work Title";
$map['work_zip'] = "Work Zip";