got replies and edits working

This commit is contained in:
JT Smith 2003-08-24 18:46:38 +00:00
parent 74c733c2d4
commit 781526066f
3 changed files with 40 additions and 19 deletions

View file

@ -19,7 +19,7 @@ sub create {
my $forumPostId = WebGUI::SQL->setRow("forumPost","forumPostId", $data);
$self = WebGUI::Forum::Post->new($forumPostId);
if ($data->{parentId} > 0) {
$self->getThread->addReply($forumPostId,$self->get("dateOfPost"));
$self->getThread->addReply($forumPostId,$self->get("dateOfPost"),$self->get("forumPostId"));
}
return $self;
}
@ -81,7 +81,7 @@ sub new {
sub set {
my ($self, $data) = @_;
$data->{forumPostId} = $self->get("forumPostId") unless ($data->{forumId});
$data->{forumPostId} = $self->get("forumPostId") unless ($data->{forumPostId});
WebGUI::SQL->setRow("forumPost","forumPostId",$data);
$self->{_properties} = $data;
}