X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Fphotos.php;h=663d0a40cbaa8d1ec65cdddb3c61dd79bb0eb230;hb=bcb672e7ff859168b639ffffc38553bbcf7e918c;hp=89fef2ee8652f26d432c9867c9c14743de1daf0b;hpb=1ccda19f7a0baae1d738891f9b73ff97242cbdff;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 89fef2ee86..663d0a40cb 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -3,6 +3,7 @@ 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) { @@ -23,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 .= '