X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Fphotos.php;h=cb13b760364e72df276db5c3db5dc8eeeef0e074;hb=0e1f868237d568ca7f4a0cb9f8216776fcb4c787;hp=4bb6e3eab47b6a96e2759d886f831aafec9bd6bb;hpb=a0d2747d527221fc517e5d277035d6e5b07ebf93;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 4bb6e3eab4..cb13b76036 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -3,9 +3,14 @@ require_once('include/Photo.php'); require_once('include/items.php'); require_once('include/acl_selectors.php'); require_once('include/bbcode.php'); +require_once('include/security.php'); function photos_init(&$a) { + + if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + return; + } $o = ''; if($a->argc > 1) { @@ -19,7 +24,9 @@ function photos_init(&$a) { $a->data['user'] = $r[0]; - $albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d", + $sql_extra = permissions_sql($a->data['user']['uid']); + + $albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d $sql_extra ", intval($a->data['user']['uid']) ); @@ -31,7 +38,11 @@ function photos_init(&$a) { $o .= '