Skip to content

Commit

Permalink
MDL-30273 forum - prevent the creation of discussions in simple singl…
Browse files Browse the repository at this point in the history
…e forums
  • Loading branch information
mackensen authored and abgreeve committed Nov 18, 2011
1 parent cf04ce3 commit 674d35b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4828,6 +4828,10 @@ function forum_user_can_post_discussion($forum, $currentgroup=null, $unused=-1,
if (!has_capability($capname, $context)) {
return false;
}

if ($forum->type == 'single') {
return false;
}

if ($forum->type == 'eachuser') {
if (forum_user_has_posted_discussion($forum->id, $USER->id)) {
Expand Down

0 comments on commit 674d35b

Please sign in to comment.