aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Photo.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-07 18:05:29 -0700
committerzotlabs <mike@macgirvin.com>2017-05-07 18:05:29 -0700
commit1a05939e0bde75d251612c10e49aa7a3b61de64c (patch)
tree13344c496f314a6a6151bb4c3f4f949ab7cfefac /Zotlabs/Module/Photo.php
parentacb8e85b6108610f927811c52c9304b207963015 (diff)
downloadvolse-hubzilla-1a05939e0bde75d251612c10e49aa7a3b61de64c.tar.gz
volse-hubzilla-1a05939e0bde75d251612c10e49aa7a3b61de64c.tar.bz2
volse-hubzilla-1a05939e0bde75d251612c10e49aa7a3b61de64c.zip
cleanup of last checkin
Diffstat (limited to 'Zotlabs/Module/Photo.php')
-rw-r--r--Zotlabs/Module/Photo.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index dc4ae670e..8963480e6 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -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'];