summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNDB/Handler')
-rw-r--r--lib/VNDB/Handler/Users.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm
index c0836f97..6b30db7b 100644
--- a/lib/VNDB/Handler/Users.pm
+++ b/lib/VNDB/Handler/Users.pm
@@ -33,6 +33,7 @@ sub userpage {
return $self->resNotFound if !$u->{id};
my $votes = $u->{c_votes} && $self->dbVoteStats(uid => $uid);
+ my $list_visible = !$u->{hide_list} || ($self->authInfo->{id}||0) == $u->{id} || $self->authCan('usermod');
my $title = mt '_userpage_title', $u->{username};
$self->htmlHeader(title => $title, noindex => 1);
@@ -70,7 +71,7 @@ sub userpage {
Tr;
td mt '_userpage_votes';
td;
- if($u->{hide_list}) {
+ if(!$list_visible) {
txt mt '_userpage_hidden';
} elsif($votes) {
my($total, $count) = (0, 0);
@@ -100,7 +101,7 @@ sub userpage {
Tr;
td mt '_userpage_list';
- td $u->{hide_list} ? mt('_userpage_hidden') :
+ td !$list_visible ? mt('_userpage_hidden') :
mt('_userpage_list_item', $u->{releasecount}, $u->{vncount});
end;
@@ -117,7 +118,7 @@ sub userpage {
end 'table';
end 'div';
- if(!$u->{hide_list} && $votes) {
+ if($votes && $list_visible) {
div class => 'mainbox';
h1 mt '_userpage_votestats';
$self->htmlVoteStats(u => $u, $votes);