summaryrefslogtreecommitdiff
path: root/program/include/rcube_vcard.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-03 10:40:29 +0000
committeralecpl <alec@alec.pl>2011-08-03 10:40:29 +0000
commit359e19a19dd45d64d14c7b29461f0fbe4f8a50bd (patch)
treed20c4712d1a509a7b436fbc11a517ec0536707af /program/include/rcube_vcard.php
parentfeaf7b5ec64528b140219ef07e64ef823f20ba9d (diff)
- Fix EOL character in vCard exports (#1487873)
Diffstat (limited to 'program/include/rcube_vcard.php')
-rw-r--r--program/include/rcube_vcard.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/include/rcube_vcard.php b/program/include/rcube_vcard.php
index 90ee7da66..c7dfe537b 100644
--- a/program/include/rcube_vcard.php
+++ b/program/include/rcube_vcard.php
@@ -33,7 +33,7 @@ class rcube_vcard
'FN' => array(),
'N' => array(array('','','','','')),
);
- static private $fieldmap = array(
+ private static $fieldmap = array(
'phone' => 'TEL',
'birthday' => 'BDAY',
'website' => 'URL',
@@ -65,6 +65,7 @@ class rcube_vcard
public $notes;
public $email = array();
+ public static $eol = "\r\n";
/**
* Constructor
@@ -640,11 +641,11 @@ class rcube_vcard
if (self::is_empty($value))
continue;
- $vcard .= self::vcard_quote($type) . $attr . ':' . self::vcard_quote($value) . "\n";
+ $vcard .= self::vcard_quote($type) . $attr . ':' . self::vcard_quote($value) . self::$eol;
}
}
- return "BEGIN:VCARD\nVERSION:3.0\n{$vcard}END:VCARD";
+ return 'BEGIN:VCARD' . self::$eol . 'VERSION:3.0' . self::$eol . $vcard . 'END:VCARD';
}