aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Photo.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-08-31 09:41:07 +0200
committerMario Vavti <mario@mariovavti.com>2016-08-31 09:41:07 +0200
commite9462ba14529b7172ba5a21e7985d24de91faa37 (patch)
treec2270ca2975f6683a361c5959894b6bbc954475d /Zotlabs/Module/Photo.php
parent2b9322fc7d879fecbe334083bbd028538c985c54 (diff)
parentb775a1aa0e36a74f0f937d85f458fd12af18a264 (diff)
downloadvolse-hubzilla-e9462ba14529b7172ba5a21e7985d24de91faa37.tar.gz
volse-hubzilla-e9462ba14529b7172ba5a21e7985d24de91faa37.tar.bz2
volse-hubzilla-e9462ba14529b7172ba5a21e7985d24de91faa37.zip
resolve merge conflict
Diffstat (limited to 'Zotlabs/Module/Photo.php')
-rw-r--r--Zotlabs/Module/Photo.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 66aaec49f..a16206299 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -133,7 +133,16 @@ class Photo extends \Zotlabs\Web\Controller {
$allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_storage') : true);
$sql_extra = permissions_sql($r[0]['uid']);
+
+ if(! $sql_extra)
+ $sql_extra = ' and true ';
+
+ // Only check permissions on normal photos. Those photos we don't check includes
+ // profile photos, xchan photos (which are also profile photos), 'thing' photos,
+ // and cover photos
+ $sql_extra = " and (( photo_usage = 0 $sql_extra ) or photo_usage != 0 )";
+
$channel = channelx_by_n($r[0]['uid']);
// Now we'll see if we can access the photo