$canreply
);
+ $userfrom->customheaders[] = sprintf('List-Unsubscribe: <%s>',
+ $data->get_unsubscribediscussionlink());
+
if (!isset($userto->viewfullnames[$forum->id])) {
$data->viewfullnames = has_capability('moodle/site:viewfullnames', $modcontext, $userto->id);
} else {
// Prepare an array of commands
$commands = array();
+ // Add a permalink.
+ $permalink = new moodle_url($discussionlink);
+ $permalink->set_anchor('p' . $post->id);
+ $commands[] = array('url' => $permalink, 'text' => get_string('permalink', 'forum'));
+
// SPECIAL CASE: The front page can display a news item post to non-logged in users.
// Don't display the mark read / unread controls in this case.
if ($istracked && $CFG->forum_usermarksread && isloggedin()) {