X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fphotos.php;h=63bd46a6cbde1ddeb63795dfe7580e1a561bdf14;hb=a9ec56ace1756726517650d96192df5320f445fe;hp=81ea3901abd0aa24cebcd83270c0189ef8b30772;hpb=7d5ace644eb49282ba566e15c6c82d8bfc9244aa;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 81ea3901ab..63bd46a6cb 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1,13 +1,21 @@ argc > 1) { $nick = $a->argv[1]; - $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1", + $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1", dbesc($nick) ); @@ -16,61 +24,131 @@ 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 .= '