diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 93bc12788..094c0872b 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -26,6 +26,7 @@ - fix [ 1435382 ] 6.8.6 always "unsubscribe" link for Admin - fix [ 1488850 ] Collaboration front page slow to load - The CS main listing is now 863% faster. + - Fixed a problem where last reply column wasn't being updated in the thread. 6.99.0 - Added an Events Management System asset that can help people run diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index 62f9249a1..4640b7288 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -52,6 +52,16 @@ sub canSubscribe { return ($self->session->user->userId ne "1" && $self->canView); } +#------------------------------------------------------------------- + +sub commit { + my $self = shift; + $self->SUPER::commit; + if ($self->isNew) { + $self->getParent->incrementThreads($self->get("dateUpdated"),$self->getId); + } +} + #------------------------------------------------------------------- sub createSubscriptionGroup { my $self = shift; @@ -524,9 +534,6 @@ sub prepareView { sub processPropertiesFromFormPost { my $self = shift; $self->SUPER::processPropertiesFromFormPost; - if ($self->session->form->process("assetId") eq "new") { - $self->getParent->incrementThreads($self->get("dateUpdated"),$self->getId) unless ($self->isReply); - } if ($self->getParent->canEdit) { my $karmaScale = $self->session->form->process("karmaScale","integer") || $self->getParent->get("defaultKarmaScale"); my $karmaRank = $self->get("karma")/$karmaScale;