Permalink
Browse files

Added an "unsubscribe" link to emails

  • Loading branch information...
1 parent 28e1e8b commit 8f66d49a779fb22a169ede89def93d1985abe5bc martin committed Sep 8, 2002
Showing with 6 additions and 0 deletions.
  1. +6 −0 mod/forum/lib.php
View
@@ -905,6 +905,7 @@ function forum_cron () {
if ($users = forum_subscribed_users($course, $forum)) {
$strforums = get_string("forums", "forum");
+ $canunsubscribe = ! forum_is_forcesubscribed($forum->id);
$mailcount=0;
foreach ($users as $userto) {
@@ -946,6 +947,11 @@ function forum_cron () {
$posthtml .= " -> <A HREF=\"$CFG->wwwroot/mod/forum/discuss.php?d=$discussion->id\">$discussion->name</A></FONT></P>";
}
$posthtml .= forum_make_mail_post($post, $userfrom, $userto, $course, false, true, false, false);
+
+ if ($canunsubscribe) {
+ $posthtml .= "\n<BR><HR SIZE=1 NOSHADE><FONT SIZE=1><A HREF=\"$CFG->wwwroot/mod/forum/subscribe.php?id=$forum->id\">".get_string("unsubscribe", "forum")."</A></FONT>";
+ }
+
} else {
$posthtml = "";
}

0 comments on commit 8f66d49

Please sign in to comment.