Update the number of threads in the CS when a thread is archived. Fixes bug #11341.

This commit is contained in:
Colin Kuskie 2010-01-11 11:54:59 -08:00
parent b5f5f8f6e8
commit 6e0983a67b
4 changed files with 39 additions and 21 deletions

View file

@ -41,7 +41,7 @@ sub addRevision {
=head2 archive
Archives all posts under this thread.
Archives all posts under this thread. Update the thread count in the parent CS.
=cut
@ -50,6 +50,8 @@ sub archive {
foreach my $post (@{$self->getPosts}) {
$post->setStatusArchived;
}
my $cs = $self->getParent;
$cs->incrementThreads($cs->get("lastPostId"), $cs->get("lastPostDate"));
}
#-------------------------------------------------------------------

View file

@ -93,8 +93,8 @@ our $I18N = {
},
'forum.threads' => {
message => q|The total number of threads in this forum.|,
lastUpdated => 1149632734,
message => q|The total number of threads in this forum. This does not include those that have been archived.|,
lastUpdated => 1263239637,
},
'forum.url' => {