Extra spaces patch for CSV exports
There are some carriage returns in some of the descriptions which was throwing off the CSV cell assignment, so added a quick patch that replaces said returns with a simple space to keep formatting intact
This commit is contained in:
parent
a15db82697
commit
86652cc112
1 changed files with 4 additions and 0 deletions
|
@ -39,7 +39,11 @@ class ExportController extends Controller
|
||||||
$rate = $total / count($sources);
|
$rate = $total / count($sources);
|
||||||
if ($rate * 100 >= $percent) {
|
if ($rate * 100 >= $percent) {
|
||||||
if ($type == 'mastodon') {
|
if ($type == 'mastodon') {
|
||||||
|
//comman break teh CSV so just take them out
|
||||||
$comments = str_replace(",", ";", $location->description);
|
$comments = str_replace(",", ";", $location->description);
|
||||||
|
//remove extra white space
|
||||||
|
$comments = str_replace(["\n\r", "\n", "\r"], " ", $comments);
|
||||||
|
//add to the export list
|
||||||
array_push($list, [$location->url, $location->rating, $comments, "FALSE", "FALSE", "FALSE"]);
|
array_push($list, [$location->url, $location->rating, $comments, "FALSE", "FALSE", "FALSE"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue