diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-20 11:09:02 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-20 11:09:02 +0000 |
| commit | 12b8376314c4535b4205b7e816847ebcdf336293 (patch) | |
| tree | 414f78d3b9c61e261275af3781dd3d21de23f4e0 /roundcubemail/program | |
| parent | 1003ca2062468296ece424db3f4cf5da16072931 (diff) | |
- Fix import of vCard entries with params (#1485453)
git-svn-id: https://svn.roundcube.net/trunk@2771 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/rcube_vcard.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/roundcubemail/program/include/rcube_vcard.php b/roundcubemail/program/include/rcube_vcard.php index c9ff49fcd..7dbbb3f71 100644 --- a/roundcubemail/program/include/rcube_vcard.php +++ b/roundcubemail/program/include/rcube_vcard.php @@ -264,13 +264,13 @@ class rcube_vcard } if (!preg_match('/^(BEGIN|END)$/i', $line[1]) && preg_match_all('/([^\\;]+);?/', $line[1], $regs2)) { - $entry = array(''); + $entry = array(); $field = strtoupper($regs2[1][0]); foreach($regs2[1] as $attrid => $attr) { if ((list($key, $value) = explode('=', $attr)) && $value) { if ($key == 'ENCODING') { - # add next line(s) to value string if QP line end detected + // add next line(s) to value string if QP line end detected while ($value == 'QUOTED-PRINTABLE' && preg_match('/=$/', $lines[$i])) $line[2] .= "\n" . $lines[++$i]; @@ -280,17 +280,16 @@ class rcube_vcard $entry[strtolower($key)] = array_merge((array)$entry[strtolower($key)], (array)self::vcard_unquote($value, ',')); } else if ($attrid > 0) { - $entry[$key] = true; # true means attr without =value + $entry[$key] = true; // true means attr without =value } } - $entry[0] = self::vcard_unquote($line[2]); + $entry = array_merge($entry, (array)self::vcard_unquote($line[2])); $data[$field][] = count($entry) > 1 ? $entry : $entry[0]; } } unset($data['VERSION']); - return $data; } @@ -360,7 +359,7 @@ class rcube_vcard if (is_int($attrname)) $value[] = $attrvalues; elseif ($attrvalues === true) - $attr .= ";$attrname"; # true means just tag, not tag=value, as in PHOTO;BASE64:... + $attr .= ";$attrname"; // true means just tag, not tag=value, as in PHOTO;BASE64:... else { foreach((array)$attrvalues as $attrvalue) $attr .= ";$attrname=" . self::vcard_quote($attrvalue, ','); |
