MDL-14270 fixed regressions - fatal error in forum code; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-04-14 09:01:02 +00:00
parent debd3d62b3
commit 948091f460

View File

@ -2080,7 +2080,7 @@ function forum_count_discussions($forum, $cm, $course) {
return $cache[$course->id][$forum->id];
}
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_MODULE, $cm))) {
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_MODULE, $cm->id))) {
return $cache[$course->id][$forum->id];
}
@ -5806,7 +5806,7 @@ function forum_tp_count_forum_unread_posts($cm, $course) {
return $readcache[$course->id][$forumid];
}
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_MODULE, $cm))) {
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_MODULE, $cm->id))) {
return $readcache[$course->id][$forumid];
}