mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
cover photo was unintentionally disabled when block_public in effect
This commit is contained in:
parent
bd3708870d
commit
a7ea370ec3
1 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue