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,9 +1,13 @@
|
|||
package WebGUI::Forum;
|
||||
|
||||
use strict;
|
||||
use WebGUI::Forum::Thread;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
|
||||
sub create {
|
||||
my ($self, $data) = @_;
|
||||
$data->{forumId} = "new";
|
||||
|
|
@ -27,6 +31,12 @@ sub getThread {
|
|||
return $self->{_thread}{$threadId};
|
||||
}
|
||||
|
||||
sub isModerator {
|
||||
my ($self, $userId) = @_;
|
||||
$userId = $session{user}{userId} unless ($userId);
|
||||
return WebGUI::Privilege::isInGroup($self->get("groupToModerate"), $userId);
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($self, $forumId) = @_;
|
||||
my $properties = WebGUI::SQL->getRow("forum","forumId",$forumId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue