got replies and edits working
This commit is contained in:
parent
74c733c2d4
commit
781526066f
3 changed files with 40 additions and 19 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue