Make Threads recalculate the number of replies when restoring a Post from the Trash.

Fixes bug #10758.
This commit is contained in:
Colin Kuskie 2009-08-17 22:25:24 +00:00
parent 0762ce1730
commit 0511af269d
3 changed files with 31 additions and 1 deletions

View file

@ -1251,6 +1251,21 @@ sub recalculatePostRating {
$self->update({rating=>$sum});
}
#-------------------------------------------------------------------
=head2 restore
Extend the base class to also make the thread containing this post to recalculate its replies
=cut
sub restore {
my $self = shift;
$self->SUPER::restore(@_);
$self->getThread->sumReplies;
}
#-------------------------------------------------------------------
=head2 rethreadUnder ($thread)