diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-04-14 11:50:34 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-04-14 11:50:34 +0200 |
commit | 79b5fb5b580e024fc1e29d2fc8d0c1603f9e8ab0 (patch) | |
tree | ad8cb467592611c88e1d06c7cd10f40df6ff303d /mod/attach.php | |
parent | bf2a97147ecef7528e9adbed3cf4a1f3af03ad72 (diff) | |
parent | 584e9233d4a95e3f8cbc33eaedcc59d3210a66b9 (diff) | |
download | volse-hubzilla-79b5fb5b580e024fc1e29d2fc8d0c1603f9e8ab0.tar.gz volse-hubzilla-79b5fb5b580e024fc1e29d2fc8d0c1603f9e8ab0.tar.bz2 volse-hubzilla-79b5fb5b580e024fc1e29d2fc8d0c1603f9e8ab0.zip |
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Diffstat (limited to 'mod/attach.php')
-rw-r--r-- | mod/attach.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/attach.php b/mod/attach.php index cf72d09c6..118c67dd5 100644 --- a/mod/attach.php +++ b/mod/attach.php @@ -36,7 +36,8 @@ function attach_init(&$a) { header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"'); if($r['data']['flags'] & ATTACH_FLAG_OS ) { - $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $r['data']['data'],'rb'); + $fname = dbunescbin($r['data']['data']); + $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname,'rb'); $ostream = fopen('php://output','wb'); if($istream && $ostream) { pipe_streams($istream,$ostream); @@ -45,7 +46,7 @@ function attach_init(&$a) { } } else - echo $r['data']['data']; + echo dbunescbin($r['data']['data']); killme(); } |