a couple little tweaks

This commit is contained in:
JT Smith 2003-10-07 04:16:10 +00:00
parent 5477108b9b
commit 45788efd32
3 changed files with 14 additions and 8 deletions

View file

@ -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);