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:
ro 2023-11-12 12:22:22 -06:00
parent ccb9536204
commit 29c8935bfa
2 changed files with 4 additions and 2 deletions

View file

@ -41,8 +41,10 @@ class ExportController extends Controller
if ($type == 'mastodon') { if ($type == 'mastodon') {
//comman break teh CSV so just take them out //comman break teh CSV so just take them out
$comments = str_replace(",", ";", $location->description); $comments = str_replace(",", ";", $location->description);
//remove extra white space //remove extra white space
$comments = str_replace(["\n\r", "\n", "\r"], " ", $comments); $comments = str_replace(["\n\r", "\n", "\r"], " ", $comments);
$comments = str_replace(['"', "'"], "", $comments);
//add to the export list //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"]);
} }

View file

@ -81,9 +81,9 @@ class LocationController extends Controller
$silence = 0; $silence = 0;
$suspend = 0; $suspend = 0;
if ($item['severity'] == "suspend" || $item['severity'] == "defederate") { if ($item['severity'] == "suspend" || $item['severity'] == "defederate") {
++$silence;
} else {
++$suspend; ++$suspend;
} else {
++$silence;
} }
array_push($unified, [ array_push($unified, [
'name' => $item['domain'], 'name' => $item['domain'],