mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:15:11 +00:00
use correct (or at least official) capitalisation on Content-Disposition
This commit is contained in:
parent
685200c53b
commit
570832dd48
11 changed files with 13 additions and 13 deletions
|
@ -38,7 +38,7 @@ class Attach extends \Zotlabs\Web\Controller {
|
|||
header('Content-type: ' . $r['data']['filetype']);
|
||||
}
|
||||
|
||||
header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
|
||||
header('Content-Disposition: attachment; filename="' . $r['data']['filename'] . '"');
|
||||
if(intval($r['data']['os_storage'])) {
|
||||
$fname = dbunescbin($r['data']['content']);
|
||||
if(strpos($fname,'store') !== false)
|
||||
|
|
|
@ -249,7 +249,7 @@ class Calendar extends Controller {
|
|||
);
|
||||
if ($r) {
|
||||
header('Content-type: text/calendar');
|
||||
header('content-disposition: attachment; filename="' . t('event') . '-' . $event_id . '.ics"' );
|
||||
header('Content-Disposition: attachment; filename="' . t('event') . '-' . $event_id . '.ics"' );
|
||||
echo ical_wrapper($r);
|
||||
killme();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ class Calendar extends Controller {
|
|||
|
||||
if ($export) {
|
||||
header('Content-type: text/calendar');
|
||||
header('content-disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
|
||||
header('Content-Disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
|
||||
echo ical_wrapper($r);
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -281,7 +281,7 @@ class Events extends Controller {
|
|||
);
|
||||
if($r) {
|
||||
header('Content-type: text/calendar');
|
||||
header('content-disposition: attachment; filename="' . t('event') . '-' . $event_id . '.ics"' );
|
||||
header('Content-Disposition: attachment; filename="' . t('event') . '-' . $event_id . '.ics"' );
|
||||
echo ical_wrapper($r);
|
||||
killme();
|
||||
}
|
||||
|
@ -705,7 +705,7 @@ class Events extends Controller {
|
|||
|
||||
if($export) {
|
||||
header('Content-type: text/calendar');
|
||||
header('content-disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
|
||||
header('Content-Disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
|
||||
echo ical_wrapper($r);
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ class Getfile extends Controller {
|
|||
header('Content-type: ' . $r['data']['filetype']);
|
||||
}
|
||||
|
||||
header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
|
||||
header('Content-Disposition: attachment; filename="' . $r['data']['filename'] . '"');
|
||||
if(intval($r['data']['os_storage'])) {
|
||||
$fname = dbunescbin($r['data']['content']);
|
||||
if(strpos($fname,'store') !== false)
|
||||
|
|
|
@ -109,7 +109,7 @@ class Layouts extends Controller {
|
|||
);
|
||||
if($r) {
|
||||
header('Content-type: application/x-hubzilla-layout');
|
||||
header('Content-disposition: attachment; filename="' . $r[0]['sid'] . '.pdl"');
|
||||
header('Content-Disposition: attachment; filename="' . $r[0]['sid'] . '.pdl"');
|
||||
echo json_encode($r);
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ class Profile extends \Zotlabs\Web\Controller {
|
|||
|
||||
if(argc() > 2 && argv(2) === 'vcard') {
|
||||
header('Content-type: text/vcard');
|
||||
header('content-disposition: attachment; filename="' . t('vcard') . '-' . $profile['channel_address'] . '.vcf"' );
|
||||
header('Content-Disposition: attachment; filename="' . t('vcard') . '-' . $profile['channel_address'] . '.vcf"' );
|
||||
echo \App::$profile['profile_vcard'];
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ class Profiles extends Controller {
|
|||
return;
|
||||
}
|
||||
header('content-type: application/octet_stream');
|
||||
header('content-disposition: attachment; filename="' . $r1[0]['profile_name'] . '.json"' );
|
||||
header('Content-Disposition: attachment; filename="' . $r1[0]['profile_name'] . '.json"' );
|
||||
|
||||
unset($r1[0]['id']);
|
||||
unset($r1[0]['aid']);
|
||||
|
|
|
@ -26,7 +26,7 @@ class Uexport extends Controller {
|
|||
}
|
||||
|
||||
header('content-type: application/json');
|
||||
header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . (($_REQUEST['sections']) ? '-' . $_REQUEST['sections'] : '') . '.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));
|
||||
|
|
|
@ -42,7 +42,7 @@ class Viewsrc extends Controller {
|
|||
|
||||
if ($dload) {
|
||||
header('Content-type: ' . $r[0]['mimetype']);
|
||||
header('Content-disposition: attachment; filename="' . t('item') . '-' . $item_id . '"' );
|
||||
header('Content-Disposition: attachment; filename="' . t('item') . '-' . $item_id . '"' );
|
||||
echo $r[0]['body'];
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -675,7 +675,7 @@ class Webpages extends Controller {
|
|||
// Generate the zip file
|
||||
ExtendedZip::zipTree($tmp_folderpath, $zip_filepath, ZipArchive::CREATE);
|
||||
// Output the file for download
|
||||
header('Content-disposition: attachment; filename="' . $zip_filename . '"');
|
||||
header('Content-Disposition: attachment; filename="' . $zip_filename . '"');
|
||||
header("Content-Type: application/zip");
|
||||
$success = readfile($zip_filepath);
|
||||
} elseif ($action === 'cloud') { // Only zipfile or cloud should be possible values for $action here
|
||||
|
|
|
@ -295,7 +295,7 @@ class File extends DAV\Node implements DAV\IFile {
|
|||
$unsafe_types = array('text/html', 'text/css', 'application/javascript');
|
||||
|
||||
if (in_array($r[0]['filetype'], $unsafe_types) && (! channel_codeallowed($this->data['uid']))) {
|
||||
header('Content-disposition: attachment; filename="' . $r[0]['filename'] . '"');
|
||||
header('Content-Disposition: attachment; filename="' . $r[0]['filename'] . '"');
|
||||
header('Content-type: text/plain');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue