aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-11-08 13:54:31 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-11-08 13:54:31 -0800
commitcf0bff8582e7b70a4931e3c510cd0018e0b5ec6c (patch)
tree760600e8064e570c52d3a940fb481d3fab20b4da /mod
parent1874346c460c29a087bb81833c0b760a91e35970 (diff)
downloadvolse-hubzilla-cf0bff8582e7b70a4931e3c510cd0018e0b5ec6c.tar.gz
volse-hubzilla-cf0bff8582e7b70a4931e3c510cd0018e0b5ec6c.tar.bz2
volse-hubzilla-cf0bff8582e7b70a4931e3c510cd0018e0b5ec6c.zip
relative attachment not fetched due to os filename issue
Diffstat (limited to 'mod')
-rw-r--r--mod/attach.php5
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);