updating discussion
This commit is contained in:
parent
4b66502e4c
commit
44b35c3412
4 changed files with 82 additions and 9 deletions
|
|
@ -82,6 +82,11 @@ sub isLocked {
|
|||
return $self->get("isLocked");
|
||||
}
|
||||
|
||||
sub incrementViews {
|
||||
my ($self) = @_;
|
||||
WebGUI::SQL->write("update forumThread set views=views+1 where forumThreadId=".$self->get("forumThreadId"));
|
||||
}
|
||||
|
||||
sub isSticky {
|
||||
my ($self) = @_;
|
||||
return $self->get("isSticky");
|
||||
|
|
@ -100,11 +105,6 @@ sub lock {
|
|||
$self->set({isLocked=>1});
|
||||
}
|
||||
|
||||
sub stick {
|
||||
my ($self) = @_;
|
||||
$self->set({isSticky=>1});
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($class, $forumThreadId) = @_;
|
||||
my $properties = WebGUI::SQL->getRow("forumThread","forumThreadId",$forumThreadId);
|
||||
|
|
@ -122,6 +122,31 @@ sub set {
|
|||
$self->{_properties} = $data;
|
||||
}
|
||||
|
||||
sub setStatusApproved {
|
||||
my ($self) = @_;
|
||||
$self->set({status=>'approved'});
|
||||
}
|
||||
|
||||
sub setStatusDeleted {
|
||||
my ($self) = @_;
|
||||
$self->set({status=>'deleted'});
|
||||
}
|
||||
|
||||
sub setStatusDenied {
|
||||
my ($self) = @_;
|
||||
$self->set({status=>'denied'});
|
||||
}
|
||||
|
||||
sub setStatusPending {
|
||||
my ($self) = @_;
|
||||
$self->set({status=>'pending'});
|
||||
}
|
||||
|
||||
sub stick {
|
||||
my ($self) = @_;
|
||||
$self->set({isSticky=>1});
|
||||
}
|
||||
|
||||
sub subscribe {
|
||||
my ($self, $userId) = @_;
|
||||
$userId = $session{user}{userId} unless ($userId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue