merging 6.5.6 bugfixes

This commit is contained in:
JT Smith 2005-04-19 20:55:11 +00:00
parent cd83598f7c
commit a58f2786f7
15 changed files with 207 additions and 88 deletions

View file

@ -509,6 +509,27 @@ sub subscribe {
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
}
#-------------------------------------------------------------------
=head2 trash
Moves thread to the trash and decrements reply counter on thread.
=cut
sub trash {
my $self = shift;
$self->SUPER::trash;
$self->getParent->decrementThreads;
if ($self->getParent->get("lastPostId") eq $self->getId) {
my $parentLineage = $self->getThread->get("lineage");
my ($id, $date) = WebGUI::SQL->quickArray("select assetId, dateSubmitted from Post where lineage like ".quote($parentLineage.'%')." and assetId<>".quote($self->getId)." order by dateSubmitted desc");
$self->getParent->setLastPost($id,$date);
}
}
#-------------------------------------------------------------------
=head2 unlock ( )