| | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2006-2011, The Roundcube Dev Team | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | Licensed under the GNU General Public License version 3 or | |
| | | | any later version with exceptions for skins & plugins. | |
| | | | See the README file for a full license statement. | |
| | | | | |
| | | | PURPOSE: | |
| | | | Interface to the local address book database | |
| | |
| | | protected $db_name = 'contacts'; |
| | | protected $db_groups = 'contactgroups'; |
| | | protected $db_groupmembers = 'contactgroupmembers'; |
| | | protected $vcard_fieldmap = array(); |
| | | |
| | | /** |
| | | * Store database connection. |
| | |
| | | |
| | | 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 { |
| | |
| | | $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); |