diff options
author | mrjive <mrjive@mrjive.it> | 2015-11-11 16:51:48 +0100 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-11-11 16:51:48 +0100 |
commit | 53a796afcc0cff6f9e3f51457df4506a43db1945 (patch) | |
tree | a2366c48e0dae047b052283cc44284224369c8cd /mod/attach.php | |
parent | a4c3058f845a1c38d06b2201a10700c5f878366d (diff) | |
parent | bc7c0ed844711e81c4bc642e3024849195a48421 (diff) | |
download | volse-hubzilla-53a796afcc0cff6f9e3f51457df4506a43db1945.tar.gz volse-hubzilla-53a796afcc0cff6f9e3f51457df4506a43db1945.tar.bz2 volse-hubzilla-53a796afcc0cff6f9e3f51457df4506a43db1945.zip |
Merge pull request #8 from redmatrix/master
get fresh code from HZ base
Diffstat (limited to 'mod/attach.php')
-rw-r--r-- | mod/attach.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/attach.php b/mod/attach.php index ad5dead07..306e39519 100644 --- a/mod/attach.php +++ b/mod/attach.php @@ -37,7 +37,10 @@ function attach_init(&$a) { header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"'); if(intval($r['data']['os_storage'])) { $fname = dbunescbin($r['data']['data']); - $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname,'rb'); + if(strpos($fname,'store') !== false) + $istream = fopen($fname,'rb'); + else + $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname,'rb'); $ostream = fopen('php://output','wb'); if($istream && $ostream) { pipe_streams($istream,$ostream); |