Support CSV import from Atmail (#1489045)

pull/61/merge
Aleksander Machniak 12 years ago
parent 8defd73ee0
commit 609483d9f6

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Support CSV import from Atmail (#1489045)
- Inlcude SQL query in the log on SQL error (#1489064) - Inlcude SQL query in the log on SQL error (#1489064)
- Fix handling untagged responses in IMAP FETCH - "could not load message" error (#1489074) - Fix handling untagged responses in IMAP FETCH - "could not load message" error (#1489074)
- Fix very small window size in Chrome (#1488931) - Fix very small window size in Chrome (#1488931)

@ -130,6 +130,23 @@ class rcube_csv2vcard
'work_state' => 'region:work', 'work_state' => 'region:work',
'home_city_short' => 'locality:home', 'home_city_short' => 'locality:home',
'home_state_short' => 'region: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 @@ class rcube_csv2vcard
//'work_address_2' => "Work Address 2", //'work_address_2' => "Work Address 2",
'work_country' => "Work Country", 'work_country' => "Work Country",
'work_zipcode' => "Work ZipCode", '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(); protected $local_label_map = array();
@ -384,9 +422,13 @@ class rcube_csv2vcard
$contact['birthday'] = $contact['birthday-y'] .'-' .$contact['birthday-m'] . '-' . $contact['birthday-d']; $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) { foreach (array('birthday', 'anniversary') as $key) {
if (!empty($contact[$key]) && $contact[$key] == '0/0/00') { // @TODO: localization? if (!empty($contact[$key])) {
unset($contact[$key]); $date = preg_replace('/[0[:^word:]]/', '', $contact[$key]);
if (empty($date)) {
unset($contact[$key]);
}
} }
} }

@ -91,3 +91,20 @@ $map['work_phone'] = "Work Phone";
$map['work_address'] = "Work Address"; $map['work_address'] = "Work Address";
$map['work_country'] = "Work Country"; $map['work_country'] = "Work Country";
$map['work_zipcode'] = "Work ZipCode"; $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";

Loading…
Cancel
Save