diff --git a/index.php b/index.php index 24bc1d3b05d..8515f4b2cea 100644 --- a/index.php +++ b/index.php @@ -208,7 +208,7 @@ $subtext = get_string('subscribe', 'forum'); } print_heading_block($newsforum->name); - echo ''; + echo ''; } else { print_heading_block($newsforum->name); } diff --git a/lang/en_utf8/forum.php b/lang/en_utf8/forum.php index c87639b324b..2effa4abea7 100644 --- a/lang/en_utf8/forum.php +++ b/lang/en_utf8/forum.php @@ -47,6 +47,8 @@ $string['configreplytouser'] = 'When a forum post is mailed out, should it conta $string['configshortpost'] = 'Any post under this length (in characters not including HTML) is considered short (see below).'; $string['configtrackreadposts'] = 'Set to \'yes\' if you want to track read/unread for each user.'; $string['configusermarksread'] = 'If \'yes\', the user must manually mark a post as read. If \'no\', when the post is viewed it is marked as read.'; +$string['confirmsubscribe'] = 'Do you really want to subscribe to forum \'{$a}\'?'; +$string['confirmunsubscribe'] = 'Do you really want to unsubscribe from forum \'{$a}\'?'; $string['couldnotadd'] = 'Could not add your post due to an unknown error'; $string['couldnotdeleteratings'] = 'Sorry, that cannot be deleted as people have already rated it'; $string['couldnotdeletereplies'] = 'Sorry, that cannot be deleted as people have already responded to it'; diff --git a/mod/forum/index.php b/mod/forum/index.php index 692657b1570..d23a17ff2c4 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -119,6 +119,7 @@ /// Do course wide subscribe/unsubscribe if (!is_null($subscribe) and !isguestuser() and !isguest()) { + require_sesskey(); foreach ($modinfo->instances['forum'] as $forumid=>$cm) { $forum = $forums[$forumid]; $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id); @@ -387,9 +388,9 @@ if (!isguest()) { print_box_start('subscription'); echo ''; - echo ''.get_string('allsubscribe', 'forum').''; + echo ''.get_string('allsubscribe', 'forum').''; echo '
'; - echo ''.get_string('allunsubscribe', 'forum').''; + echo ''.get_string('allunsubscribe', 'forum').''; echo ''; print_box_end(); print_box(' ', 'clearer'); diff --git a/mod/forum/lib.php b/mod/forum/lib.php index a8b273cea30..19b4581dfe2 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -4299,6 +4299,7 @@ function forum_get_subscribe_link($forum, $context, $messages = array(), $cantac $backtoindexlink = ''; } $link = ''; + $sesskeylink = '&sesskey='.sesskey(); if ($fakelink) { $link .= <<$linktext<\/a>"; + subs_link.innerHTML = "$linktext<\/a>"; } //]]>