MDL-33933 mod_forum: fix incorrect capability check
authorJody Steele <steelej@queensu.ca>
Wed, 12 Sep 2012 15:06:08 +0000 (08:06 -0700)
committerDan Poltawski <dan@moodle.com>
Tue, 2 Oct 2012 01:44:19 +0000 (09:44 +0800)
mod/forum/lib.php

index 9c3e801..7cfb638 100644 (file)
@@ -5322,7 +5322,7 @@ function forum_user_can_see_post($forum, $discussion, $post, $user=NULL, $cm=NUL
 
         return (($userfirstpost !== false && (time() - $userfirstpost >= $CFG->maxeditingtime)) ||
                 $firstpost->id == $post->id || $post->userid == $user->id || $firstpost->userid == $user->id ||
-                has_capability('mod/forum:viewqandawithoutposting', $modcontext, $user->id, false));
+                has_capability('mod/forum:viewqandawithoutposting', $modcontext, $user->id));
     }
     return true;
 }