continued working on new discussion system
This commit is contained in:
parent
d91076b715
commit
1ee90115c6
5 changed files with 292 additions and 17 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package WebGUI::Forum::Post;
|
||||
|
||||
use strict;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Forum::Thread;
|
||||
use WebGUI::Session;
|
||||
|
|
@ -31,6 +32,17 @@ sub get {
|
|||
return $self->{_properties}->{$key};
|
||||
}
|
||||
|
||||
sub getReplies {
|
||||
my ($self) = @_;
|
||||
my @replies;
|
||||
my $sth = WebGUI::SQL->read("select forumPostId from forumPost where parentId=".$self->get("forumPostId")." order by forumPostId");
|
||||
while (my ($postId) = $sth->array) {
|
||||
push(@replies,WebGUI::Forum::Post->new($postId));
|
||||
}
|
||||
$sth->finish;
|
||||
return \@replies;
|
||||
}
|
||||
|
||||
sub getThread {
|
||||
my ($self) = @_;
|
||||
unless (exists $self->{_thread}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue