mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
* CSV Export: Replace CRLF with LF so excel does not break lines early (myStylite#974)
This commit is contained in:
parent
5cd49ff707
commit
a8a8e1d6f2
@ -1117,7 +1117,6 @@ class nextmatch_widget
|
||||
foreach($fields as $field => $label)
|
||||
{
|
||||
$value = (array)$data[$field];
|
||||
|
||||
if ($use_type && is_array($label) && in_array($label['type'],array('select-account','select-cat','date-time','date','select','int','float')))
|
||||
{
|
||||
foreach($value as $key => $val)
|
||||
@ -1176,6 +1175,7 @@ class nextmatch_widget
|
||||
if (strpos($value,$separator) !== false || strpos($value,"\n") !== false || strpos($value,"\r") !== false)
|
||||
{
|
||||
$value = '"'.str_replace(array('\\','"'),array('\\\\','\\"'),$value).'"';
|
||||
$value = str_replace("\r\n", "\n", $value); // to avoid early linebreak by Excel
|
||||
}
|
||||
$out[] = $value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user