X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=28416922197cd8e907996c62e8a7b4193fc8ca46;hb=1df892ebbce59ac6293eacbe065ebc71826b4d85;hp=1a1ebaac1933cbdd78bd9a162e3b5b42814c047d;hpb=97b608db38edac6e4989c7343e9de8f32f46f263;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 1a1ebaac19..2841692219 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,19 +24,30 @@ 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']) ); if(count($albums)) { $a->data['albums'] = $albums; - $o .= '

' . $a->data['user']['username'] . '

'; - $o .= '

' . '' . t('Photo Albums') . '

'; - + $o .= '
'; + $o .= '
' . $a->data['user']['username'] . '
'; + $o .= '
' . $a->data['user']['username'] . '
'; + $o .= '
'; + + $o .= '