a couple little tweaks
This commit is contained in:
parent
5477108b9b
commit
45788efd32
3 changed files with 14 additions and 8 deletions
|
|
@ -43,6 +43,13 @@ sub isModerator {
|
|||
return WebGUI::Privilege::isInGroup($self->get("groupToModerate"), $userId);
|
||||
}
|
||||
|
||||
sub isSubscribed {
|
||||
my ($self, $userId) = @_;
|
||||
$userId = $session{user}{userId} unless ($userId);
|
||||
my ($isSubscribed) = WebGUI::SQL->quickArray("select count(*) from forumSubscription where forumId=".$self->get("forumId")." and userId=$userId");
|
||||
return $isSubscribed;
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($self, $forumId) = @_;
|
||||
my $properties = WebGUI::SQL->getRow("forum","forumId",$forumId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue