aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Photo.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-07 17:25:38 -0700
committerzotlabs <mike@macgirvin.com>2017-05-07 17:25:38 -0700
commitacb8e85b6108610f927811c52c9304b207963015 (patch)
tree208b55f0bb1baaa624d207bd1ed939c9ff1b8b98 /Zotlabs/Module/Photo.php
parent8c38841a4dbc1a8daca2cfce12a295f467ecbb68 (diff)
downloadvolse-hubzilla-acb8e85b6108610f927811c52c9304b207963015.tar.gz
volse-hubzilla-acb8e85b6108610f927811c52c9304b207963015.tar.bz2
volse-hubzilla-acb8e85b6108610f927811c52c9304b207963015.zip
cover photo was unintentionally disabled when block_public in effect
Diffstat (limited to 'Zotlabs/Module/Photo.php')
-rw-r--r--Zotlabs/Module/Photo.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 256a51e71..dc4ae670e 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -127,7 +127,6 @@ class Photo extends \Zotlabs\Web\Controller {
}
}
-
$r = q("SELECT uid FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1",
dbesc($photo),
intval($resolution)
@@ -150,12 +149,14 @@ class Photo extends \Zotlabs\Web\Controller {
$channel = channelx_by_n($r[0]['uid']);
// Now we'll see if we can access the photo
-
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale = %d $sql_extra LIMIT 1",
dbesc($photo),
intval($resolution)
);
-
+
+ if($r && $r[0]['photo_usage'] == PHOTO_COVER)
+ $allowed = 1;
+
$d = [ 'imgscale' => $resolution, 'resource_id' => $photo, 'photo' => $r, 'allowed' => $allowed ];
call_hooks('get_photo',$d);