diff options
author | Max Kostikov <max@kostikov.co> | 2019-04-05 14:15:40 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-04-05 14:15:40 +0200 |
commit | bd95c7b82afee463ffc1e2687f234df1d05e57f7 (patch) | |
tree | 59ea3c8a1980d7400581d3fc5f85700d7da4f892 /Zotlabs/Module | |
parent | e20c5cf9cf56eaf6af23676996fa8a1d63208899 (diff) | |
download | volse-hubzilla-bd95c7b82afee463ffc1e2687f234df1d05e57f7.tar.gz volse-hubzilla-bd95c7b82afee463ffc1e2687f234df1d05e57f7.tar.bz2 volse-hubzilla-bd95c7b82afee463ffc1e2687f234df1d05e57f7.zip |
Update Photo.php
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Photo.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php index c31e63262..f397b952f 100644 --- a/Zotlabs/Module/Photo.php +++ b/Zotlabs/Module/Photo.php @@ -82,10 +82,11 @@ class Photo extends \Zotlabs\Web\Controller { if($r) { $modified = strtotime($r[0]['edited'] . "Z"); $data = dbunescbin($r[0]['content']); - $mimetype = $r[0]['mimetype']; + if(intval($r[0]['os_storage'])) + $data = file_get_contents($data); + else + $data = dbunescbin($r[0]['content']); } - if(intval($r[0]['os_storage'])) - $data = file_get_contents($data); if(! $data) { $d = [ 'imgscale' => $resolution, 'channel_id' => $uid, 'default' => $default, 'data' => '', 'mimetype' => '' ]; |