Skip to content
Browse files

MDL-30273 prevent the creation of discussions in simple single forums

  • Loading branch information...
1 parent fe41ba7 commit 5a1038bb47de698e73f03d248d0ab36e99f78404 @mackensen mackensen committed with abgreeve Nov 15, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/forum/lib.php
View
4 mod/forum/lib.php
@@ -4831,6 +4831,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)) {

0 comments on commit 5a1038b

Please sign in to comment.
Something went wrong with that request. Please try again.