X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fphotos.php;h=63bd46a6cbde1ddeb63795dfe7580e1a561bdf14;hb=a9ec56ace1756726517650d96192df5320f445fe;hp=4a502b9fbc518de6c287e428518402d57c89698b;hpb=72b20a6eb104744a2bc64e72d35fe4ec1cc36660;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 4a502b9fbc..63bd46a6cb 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1,12 +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) ); @@ -15,57 +24,548 @@ 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 .= '