Skip to content
Browse files

MDL-16925 mod/forum - fixed blank page after posting - credit goes to…

… Martin
  • Loading branch information...
1 parent 4485ad9 commit 4999b4216e36226f316803fbb50da49af4768507 skodak committed Oct 19, 2008
Showing with 6 additions and 3 deletions.
  1. +6 −3 mod/forum/lib.php
View
9 mod/forum/lib.php
@@ -3166,11 +3166,14 @@ function forum_is_forcesubscribed($forum) {
/**
* TODO document
*/
-function forum_is_subscribed($userid, $forumid) {
- if (forum_is_forcesubscribed($forumid)) {
+function forum_is_subscribed($userid, $forum) {
+ if (!is_object($forum)) {
+ $forum = get_record('forum', 'id', $forum);
+ }
+ if (forum_is_forcesubscribed($forum)) {
return true;
}
- return record_exists("forum_subscriptions", "userid", $userid, "forum", $forumid);
+ return record_exists("forum_subscriptions", "userid", $userid, "forum", $forum->id);
}
/**

0 comments on commit 4999b42

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