MDL-47107 mod_forum: is_subscribed $cm input does not need to be a cm_info

This commit is contained in:
Andrew Nicols 2014-09-10 10:00:00 +08:00
parent 4b5fd6eb6d
commit 83daad5ac9

View File

@ -104,10 +104,10 @@ class subscriptions {
* @param int $userid The user ID
* @param \stdClass $forum The record of the forum to test
* @param int $discussionid The ID of the discussion to check
* @param \cm_info $cm The coursemodule record. If not supplied, this will be calculated using get_fast_modinfo instead.
* @param $cm The coursemodule record. If not supplied, this will be calculated using get_fast_modinfo instead.
* @return boolean
*/
public static function is_subscribed($userid, $forum, $discussionid = null, cm_info $cm = null) {
public static function is_subscribed($userid, $forum, $discussionid = null, $cm = null) {
// If forum is force subscribed and has allowforcesubscribe, then user is subscribed.
if (self::is_forcesubscribed($forum)) {
if (!$cm) {