cleanup of last checkin

This commit is contained in:
zotlabs 2017-05-07 18:05:29 -07:00
parent acb8e85b61
commit 1a05939e0b

View File

@ -154,10 +154,12 @@ class Photo extends \Zotlabs\Web\Controller {
intval($resolution)
);
if($r && $r[0]['photo_usage'] == PHOTO_COVER)
// viewing cover photos is allowed unless a plugin chooses to block it.
if($r && intval($r[0]['photo_usage']) === PHOTO_COVER && $resolution >= PHOTO_RES_COVER_1200)
$allowed = 1;
$d = [ 'imgscale' => $resolution, 'resource_id' => $photo, 'photo' => $r, 'allowed' => $allowed ];
$d = [ 'imgscale' => $resolution, 'resource_id' => $photo, 'photo' => $r[0], 'allowed' => $allowed ];
call_hooks('get_photo',$d);
$resolution = $d['imgscale'];