forked from projects/thebadspace
Quote clean up CSV export, tweaking action counts
https://tenforward.social/@noracodes reported an issue with the CSV not rendering properly because of the mix of single and double quotes, so that's been cleaned up. Also fixed action sorting which was reversed.
This commit is contained in:
parent
ccb9536204
commit
29c8935bfa
2 changed files with 4 additions and 2 deletions
|
@ -41,8 +41,10 @@ class ExportController extends Controller
|
|||
if ($type == 'mastodon') {
|
||||
//comman break teh CSV so just take them out
|
||||
$comments = str_replace(",", ";", $location->description);
|
||||
|
||||
//remove extra white space
|
||||
$comments = str_replace(["\n\r", "\n", "\r"], " ", $comments);
|
||||
$comments = str_replace(['"', "'"], "", $comments);
|
||||
//add to the export list
|
||||
array_push($list, [$location->url, $location->rating, $comments, "FALSE", "FALSE", "FALSE"]);
|
||||
}
|
||||
|
|
|
@ -81,9 +81,9 @@ class LocationController extends Controller
|
|||
$silence = 0;
|
||||
$suspend = 0;
|
||||
if ($item['severity'] == "suspend" || $item['severity'] == "defederate") {
|
||||
++$silence;
|
||||
} else {
|
||||
++$suspend;
|
||||
} else {
|
||||
++$silence;
|
||||
}
|
||||
array_push($unified, [
|
||||
'name' => $item['domain'],
|
||||
|
|
Loading…
Reference in a new issue