summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Discussions.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-24 15:18:34 +0200
committerYorhel <git@yorhel.nl>2009-10-24 15:19:10 +0200
commit5251f791de0a0e1684107b373a08cfe3a17fc447 (patch)
tree53d39d0456b464bf4525020b8503ae2d0c98b1bc /lib/VNDB/Handler/Discussions.pm
parent8243d0b30d015c2464c34b02dd4e3ecf1c599762 (diff)
parenta8921887bddb7242a95e99b5177aff6ff6cd11be (diff)
Merge branch 'beta'2.8
+ ChangeLog update
Diffstat (limited to 'lib/VNDB/Handler/Discussions.pm')
-rw-r--r--lib/VNDB/Handler/Discussions.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/Discussions.pm b/lib/VNDB/Handler/Discussions.pm
index 1d74ac6a..12b55029 100644
--- a/lib/VNDB/Handler/Discussions.pm
+++ b/lib/VNDB/Handler/Discussions.pm
@@ -29,6 +29,11 @@ sub thread {
my $p = $self->dbPostGet(tid => $tid, results => 25, page => $page, what => 'user');
return 404 if !$p->[0];
+ # mark as read when this thread is posted in the board of the currently logged in user
+ my $uid = $self->authInfo->{id};
+ $self->dbPostRead($t->{id}, $uid, $p->[$#$p]{num})
+ if $uid && grep $_->{type} eq 'u' && $_->{iid} == $uid, @{$t->{boards}};
+
$self->htmlHeader(title => $t->{title});
div class => 'mainbox';
@@ -293,7 +298,7 @@ sub board {
order => $type eq 'an' ? 't.id DESC' : 'tpl.date DESC',
);
- $self->htmlHeader(title => $title, noindex => !@$list);
+ $self->htmlHeader(title => $title, noindex => !@$list || $type eq 'u');
$self->htmlMainTabs($type, $obj, 'disc') if $iid;
div class => 'mainbox';