X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=cb13b760364e72df276db5c3db5dc8eeeef0e074;hb=9cba9d33b976a0872032de3f07f2f39dd8dfeeaa;hp=a44eb5a5f509a6667b274e73cd8923acf236ef14;hpb=9f1f9da89bb98d768b7a41b388e9c5c0d28ec946;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index a44eb5a5f5..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 .= '