aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Photo.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-10-31 20:30:36 +0000
committerMario <mario@mariovavti.com>2020-10-31 20:30:36 +0000
commitb55c7f794b06d45f3b9cdb2f8a4ce7d99aaf8902 (patch)
tree95ed2e76d040e856a7ec72abf0c1079542661107 /Zotlabs/Module/Photo.php
parent5580fc1954a63f861644e2de3773fbb3adfa8f2c (diff)
parent205279f7f877c10abf80715c55db83d2c2852eab (diff)
downloadvolse-hubzilla-b55c7f794b06d45f3b9cdb2f8a4ce7d99aaf8902.tar.gz
volse-hubzilla-b55c7f794b06d45f3b9cdb2f8a4ce7d99aaf8902.tar.bz2
volse-hubzilla-b55c7f794b06d45f3b9cdb2f8a4ce7d99aaf8902.zip
Merge branch 'dev' into 5.0RC
Diffstat (limited to 'Zotlabs/Module/Photo.php')
-rw-r--r--Zotlabs/Module/Photo.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 1cf082bdd..c88696578 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -67,18 +67,20 @@ class Photo extends \Zotlabs\Web\Controller {
$data = '';
- $r = q("SELECT * FROM photo WHERE imgscale = %d AND uid = %d AND photo_usage = %d LIMIT 1",
- intval($resolution),
- intval($uid),
- intval(PHOTO_PROFILE)
- );
- if($r) {
- $modified = strtotime($r[0]['edited'] . "Z");
- $mimetype = $r[0]['mimetype'];
- if(intval($r[0]['os_storage']))
- $data = file_get_contents(dbunescbin($r[0]['content']));
- else
- $data = dbunescbin($r[0]['content']);
+ if ($uid > 0) {
+ $r = q("SELECT * FROM photo WHERE imgscale = %d AND uid = %d AND photo_usage = %d LIMIT 1",
+ intval($resolution),
+ intval($uid),
+ intval(PHOTO_PROFILE)
+ );
+ if($r) {
+ $modified = strtotime($r[0]['edited'] . "Z");
+ $mimetype = $r[0]['mimetype'];
+ if(intval($r[0]['os_storage']))
+ $data = file_get_contents(dbunescbin($r[0]['content']));
+ else
+ $data = dbunescbin($r[0]['content']);
+ }
}
if(! $data) {