Merge pull request #289 from beardy-unixer/master

Make Firefox behave if an attachment points to a file with a space in it...
This commit is contained in:
friendica 2014-01-29 15:27:41 -08:00
commit 777d4e1ddb

View File

@ -25,7 +25,7 @@ function attach_init(&$a) {
return; return;
header('Content-type: ' . $r['data']['filetype']); header('Content-type: ' . $r['data']['filetype']);
header('Content-disposition: attachment; filename=' . $r['data']['filename']); header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
if($r['data']['flags'] & ATTACH_FLAG_OS ) { if($r['data']['flags'] & ATTACH_FLAG_OS ) {
$istream = fopen('store/' . $c[0]['channel_address'] . '/' . $r['data']['data'],'rb'); $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $r['data']['data'],'rb');
$ostream = fopen('php://output','wb'); $ostream = fopen('php://output','wb');