mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
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
714d9ba6dc
commit
4a341dc40d
@ -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"]);
|
||||||
}
|
}
|
||||||
|
@ -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'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user