Some last-minute fixes.

This commit is contained in:
James Cole
2018-07-03 17:48:26 +02:00
parent 53addcf99a
commit 18b06ff283
7 changed files with 50 additions and 12 deletions

View File

@@ -161,10 +161,8 @@ class IndexController extends Controller
$config['delimiter'] = $config['delimiter'] ?? ',';
$config['delimiter'] = "\t" === $config['delimiter'] ? 'tab' : $config['delimiter'];
// this prevents private information from escaping
$config['column-mapping-config'] = [];
$result = json_encode($config, JSON_PRETTY_PRINT);
$name = sprintf('"%s"', addcslashes('import-configuration-' . date('Y-m-d') . '.json', '"\\'));
$result = json_encode($config, JSON_PRETTY_PRINT);
$name = sprintf('"%s"', addcslashes('import-configuration-' . date('Y-m-d') . '.json', '"\\'));
/** @var LaravelResponse $response */
$response = response($result, 200);
$response->header('Content-disposition', 'attachment; filename=' . $name)