X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=0e9055d05dcf1cff004e54019a93a73c4847d686;hb=97e74f1570bc16ec1953748ebbcd11d65d6d70b3;hp=8d13f859a8560483094bf6a56fe796c8265127f7;hpb=624fd4450255e6f3f12eced715ad3d2bdd4016f1;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 8d13f859a8..0e9055d05d 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -4,14 +4,19 @@ require_once('include/items.php'); require_once('include/acl_selectors.php'); require_once('include/bbcode.php'); require_once('include/security.php'); - +require_once('include/redir.php'); +require_once('include/tags.php'); +require_once('include/threads.php'); function photos_init(&$a) { + if($a->argc > 1) + auto_redir($a, $a->argv[1]); if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { return; } + $o = ''; if($a->argc > 1) { @@ -25,26 +30,27 @@ function photos_init(&$a) { $a->data['user'] = $r[0]; + $o .= '
'; + $o .= '
' . $a->data['user']['username'] . '
'; + $o .= '
' . $a->data['user']['username'] . '
'; + $o .= '
'; + + $sql_extra = permissions_sql($a->data['user']['uid']); - $albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d $sql_extra ", + $albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d $sql_extra order by created desc", intval($a->data['user']['uid']) ); if(count($albums)) { $a->data['albums'] = $albums; - $o .= '
'; - $o .= '
' . $a->data['user']['username'] . '
'; - $o .= '
' . $a->data['user']['username'] . '
'; - $o .= '
'; - $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true); if($albums_visible) { $o .= '