X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fphotos.php;h=63bd46a6cbde1ddeb63795dfe7580e1a561bdf14;hb=a9ec56ace1756726517650d96192df5320f445fe;hp=63300ebee0f148a41621ebbfcca95a7cd4d4e658;hpb=26f97b8284f6cf10d00e28a0dc1453c1b8d5caf0;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 63300ebee0..63bd46a6cb 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1,15 +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) ); @@ -18,65 +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 .= '