Update the number of threads in the CS when a thread is archived. Fixes bug #11341.
This commit is contained in:
parent
b5f5f8f6e8
commit
6e0983a67b
4 changed files with 39 additions and 21 deletions
|
|
@ -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"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue