uexport: set content-type to json and add sections info to the default filename if present
This commit is contained in:
parent
08274ffab7
commit
14383a4c4a
@ -22,8 +22,8 @@ class Uexport extends \Zotlabs\Web\Controller {
|
||||
$month = intval(argv(2));
|
||||
}
|
||||
|
||||
header('content-type: application/octet_stream');
|
||||
header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . '.json"' );
|
||||
header('content-type: application/json');
|
||||
header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . (($_REQUEST['sections']) ? '-' . $_REQUEST['sections'] : '') . '.json"' );
|
||||
|
||||
if($year) {
|
||||
echo json_encode(identity_export_year(local_channel(),$year,$month));
|
||||
|
Reference in New Issue
Block a user