diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/attach.php | 2 | ||||
-rw-r--r-- | mod/photo.php | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/mod/attach.php b/mod/attach.php index 118c67dd5..ad5dead07 100644 --- a/mod/attach.php +++ b/mod/attach.php @@ -35,7 +35,7 @@ function attach_init(&$a) { } header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"'); - if($r['data']['flags'] & ATTACH_FLAG_OS ) { + if(intval($r['data']['os_storage'])) { $fname = dbunescbin($r['data']['data']); $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname,'rb'); $ostream = fopen('php://output','wb'); diff --git a/mod/photo.php b/mod/photo.php index 66280cb76..f757372bf 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -69,6 +69,8 @@ function photo_init(&$a) { $data = dbunescbin($r[0]['data']); $mimetype = $r[0]['type']; } + if(intval($r[0]['os_storage'])) + $data = file_get_contents($data); if(! isset($data)) { $data = file_get_contents($default); $mimetype = 'image/png'; @@ -142,6 +144,8 @@ function photo_init(&$a) { if($r && $allowed) { $data = dbunescbin($r[0]['data']); $mimetype = $r[0]['type']; + if(intval($r[0]['os_storage'])) + $data = file_get_contents($data); } else { |