mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
mastdon csv export edits
the csv exports for mastodon had some formatting issues that was making importing problematic, so those issues have been fixed so importing the doc is easier
This commit is contained in:
parent
12c58d3f29
commit
c3ce7aae65
@ -46,12 +46,12 @@ class ExportController extends Controller
|
|||||||
$sources = Source::where("active", true)->get();
|
$sources = Source::where("active", true)->get();
|
||||||
if ($type == 'mastodon') {
|
if ($type == 'mastodon') {
|
||||||
$columns = [
|
$columns = [
|
||||||
'domain',
|
'#domain',
|
||||||
'severity',
|
'#severity',
|
||||||
'public_comment',
|
'#public_comment',
|
||||||
'reject_media',
|
'#reject_media',
|
||||||
'reject_reports',
|
'#reject_reports',
|
||||||
'obfuscate',
|
'#obfuscate',
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -65,8 +65,13 @@ class ExportController extends Controller
|
|||||||
//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);
|
$comments = str_replace(['"', "'"], "", $comments);
|
||||||
|
if ($location->rating == 'defederate') {
|
||||||
|
$rating = 'suspend';
|
||||||
|
} else {
|
||||||
|
$rating = $location->rating;
|
||||||
|
}
|
||||||
//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, $rating, $comments, "FALSE", "FALSE", "FALSE"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user