fixed bug [ 838091 ] Read-Only Forum User Cannot Subscribe

This commit is contained in:
JT Smith 2003-11-16 17:40:12 +00:00
parent f9661ed755
commit 79eac4f419
2 changed files with 4 additions and 3 deletions

View file

@ -20,7 +20,8 @@
- Fixed bug [ 831331 ] translation errors
- Fixed bug [ 834792 ] Karma Decay triggers SQL error
- Fixed bug [ 832284 ] Pagination broken in Messageboard with Search
- Fixed bug [ 838091 ] Read-Only Forum User Cannot Subscribe
5.5.0
- Rewrote the discussion system and added many new features in the process.

View file

@ -1677,7 +1677,7 @@ A hash reference containing information passed from the calling object.
sub www_forumSubscribe {
my ($caller) = @_;
my $forum = WebGUI::Forum->new($session{form}{forumId});
return WebGUI::Privilege::insufficient() unless ($forum->canPost && $session{user}{userId} != 1);
return WebGUI::Privilege::insufficient() unless ($session{user}{userId} != 1);
$forum->subscribe;
return www_viewForum($caller, $session{form}{forumId});
}
@ -2152,7 +2152,7 @@ A hash reference containing information passed from the calling object.
sub www_threadSubscribe {
my ($caller) = @_;
my $post = WebGUI::Forum::Post->new($session{form}{forumPostId});
return WebGUI::Privilege::insufficient() unless ($session{user}{userId} != 1 && $post->getThread->getForum->canPost);
return WebGUI::Privilege::insufficient() unless ($session{user}{userId} != 1);
$post->getThread->subscribe;
return www_viewThread($caller, $session{form}{forumPostId});
}