Aleksander Machniak
2016-05-22 77b5d7ee304a688a2eb115ce04b460b43c0dd700
program/lib/Roundcube/rcube_csv2vcard.php
@@ -1,6 +1,6 @@
<?php
/*
/**
 +-----------------------------------------------------------------------+
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2008-2012, The Roundcube Dev Team                       |
@@ -394,7 +394,9 @@
    }
    /**
     * Import contacts from CSV file
     *
     * @param string $csv Content of the CSV file
     */
    public function import($csv)
    {
@@ -457,6 +459,8 @@
    }
    /**
     * Export vCards
     *
     * @return array rcube_vcard List of vcards
     */
    public function export()
@@ -577,9 +581,10 @@
                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;