summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube_csv2vcard.php46
-rw-r--r--program/localization/en_US/csv2vcard.inc17
2 files changed, 61 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php
index 0d3276b84..ed3bb7671 100644
--- a/program/lib/Roundcube/rcube_csv2vcard.php
+++ b/program/lib/Roundcube/rcube_csv2vcard.php
@@ -130,6 +130,23 @@ class rcube_csv2vcard
'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 @@ class rcube_csv2vcard
//'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 @@ class rcube_csv2vcard
$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]);
+ }
}
}
diff --git a/program/localization/en_US/csv2vcard.inc b/program/localization/en_US/csv2vcard.inc
index 5412f7e20..e7b86795b 100644
--- a/program/localization/en_US/csv2vcard.inc
+++ b/program/localization/en_US/csv2vcard.inc
@@ -91,3 +91,20 @@ $map['work_phone'] = "Work Phone";
$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";