| | |
| | | <?php |
| | | |
| | | /* |
| | | /** |
| | | +-----------------------------------------------------------------------+ |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2008-2012, The Roundcube Dev Team | |
| | |
| | | } |
| | | |
| | | /** |
| | | * Import contacts from CSV file |
| | | * |
| | | * @param string $csv Content of the CSV file |
| | | */ |
| | | public function import($csv) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Export vCards |
| | | * |
| | | * @return array rcube_vcard List of vcards |
| | | */ |
| | | public function export() |
| | |
| | | if ($value !== null && $value !== '') { |
| | | foreach (array($type, '*') as $_type) { |
| | | if ($data_idx = $this->gmail_label_map[$key][$item_key][$_type]) { |
| | | $value = explode(' ::: ', $value); |
| | | |
| | | if (!empty($contact[$data_idx])) { |
| | | $contact[$data_idx] = (array) $contact[$data_idx]; |
| | | $contact[$data_idx][] = $value; |
| | | $contact[$data_idx] = array_merge((array) $contact[$data_idx], $value); |
| | | } |
| | | else { |
| | | $contact[$data_idx] = $value; |