Update Photo.php

This commit is contained in:
Max Kostikov 2018-11-06 13:41:41 +01:00
parent c26f45b7c2
commit 1828b6daab

View File

@ -83,10 +83,9 @@ class Photo extends \Zotlabs\Web\Controller {
$data = dbunescbin($r[0]['content']); $data = dbunescbin($r[0]['content']);
$mimetype = $r[0]['mimetype']; $mimetype = $r[0]['mimetype'];
} }
if(intval($r[0]['os_storage'])) { if(intval($r[0]['os_storage']))
$data = file_get_contents($data); $data = file_get_contents($data);
} }
}
if(! $data) { if(! $data) {
$data = fetch_image_from_url($default,$mimetype); $data = fetch_image_from_url($default,$mimetype);
} }
@ -168,10 +167,9 @@ class Photo extends \Zotlabs\Web\Controller {
$data = dbunescbin($e[0]['content']); $data = dbunescbin($e[0]['content']);
$mimetype = $e[0]['mimetype']; $mimetype = $e[0]['mimetype'];
$modified = strtotime($e[0]['edited']); $modified = strtotime($e[0]['edited']);
if(intval($e[0]['os_storage'])) { if(intval($e[0]['os_storage']))
$streaming = $data; $streaming = $data;
} }
}
else { else {
if(! $allowed) { if(! $allowed) {
http_status_exit(403,'forbidden'); http_status_exit(403,'forbidden');