fixed a lot o bugs

This commit is contained in:
JT Smith 2003-11-18 06:19:36 +00:00
parent f2584fe07b
commit d150016395
6 changed files with 173 additions and 88 deletions

View file

@ -41,6 +41,7 @@ Data management class for forum threads.
$boolean = $thread->isSticky;
$boolean = $thread->isSubscribed;
$thread->decrementReplies;
$thread->incrementReplies($postDate, $postId);
$thread->incrementViews;
$thread->lock;
@ -103,6 +104,20 @@ sub create {
#-------------------------------------------------------------------
=head2 decrementReplies ( )
Decrements the replies counter for this thread.
=cut
sub deccrementReplies {
my ($self) = @_;
WebGUI::SQL->write("update forumThread set replies=replies-1 where forumThreadId=".$self->get("forumThreadId"));
$self->getForum->decrementReplies;
}
#-------------------------------------------------------------------
=head2 get ( [ param ] )
Returns a hash reference containing all the properties of this thread.
@ -439,6 +454,7 @@ Sets the status of this thread to deleted.
sub setStatusDeleted {
my ($self) = @_;
$self->set({status=>'deleted'});
$self->getForum->decrementThreads;
}
#-------------------------------------------------------------------