summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-01-10 21:42:06 +0000
committerthomascube <thomas@roundcube.net>2012-01-10 21:42:06 +0000
commitb98e71900de9ea6c1e965e2a389b1a99166a944e (patch)
tree1f941ffec53de3c0d51e758d53627076b850d5cb /program/include
parent8365492591fe3a4b660aa803ef0012783dc20471 (diff)
Allow plugins to extend the vcard fieldmap for contact data
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_contacts.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php
index ab3b181a5..2185b6f40 100644
--- a/program/include/rcube_contacts.php
+++ b/program/include/rcube_contacts.php
@@ -31,6 +31,7 @@ class rcube_contacts extends rcube_addressbook
protected $db_name = 'contacts';
protected $db_groups = 'contactgroups';
protected $db_groupmembers = 'contactgroupmembers';
+ protected $vcard_fieldmap = array();
/**
* Store database connection.
@@ -692,7 +693,7 @@ class rcube_contacts extends rcube_addressbook
if ($sql_arr['vcard']) {
unset($sql_arr['email']);
- $vcard = new rcube_vcard($sql_arr['vcard']);
+ $vcard = new rcube_vcard($sql_arr['vcard'], RCMAIL_CHARSET, false, $this->vcard_fieldmap);
$record += $vcard->get_assoc() + $sql_arr;
}
else {
@@ -711,7 +712,7 @@ class rcube_contacts extends rcube_addressbook
$words = '';
// copy values into vcard object
- $vcard = new rcube_vcard($record['vcard'] ? $record['vcard'] : $save_data['vcard']);
+ $vcard = new rcube_vcard($record['vcard'] ? $record['vcard'] : $save_data['vcard'], RCMAIL_CHARSET, false, $this->vcard_fieldmap);
$vcard->reset();
foreach ($save_data as $key => $values) {
list($field, $section) = explode(':', $key);