forum MDL-22551 Don't put In-Reply-To and References headers on the first post for a thread

This commit is contained in:
Martin Dougiamas
2010-09-16 01:49:06 +00:00
parent 86254f78ea
commit 436f4e0757
+4 -2
View File
@@ -455,12 +455,14 @@ function forum_cron() {
'List-Id: "'.$cleanforumname.'" <moodleforum'.$forum->id.'@'.$hostname.'>',
'List-Help: '.$CFG->wwwroot.'/mod/forum/view.php?f='.$forum->id,
'Message-ID: <moodlepost'.$post->id.'@'.$hostname.'>',
'In-Reply-To: <moodlepost'.$post->parent.'@'.$hostname.'>',
'References: <moodlepost'.$post->parent.'@'.$hostname.'>',
'X-Course-Id: '.$course->id,
'X-Course-Name: '.format_string($course->fullname, true)
);
if ($post->parent) { // This post is a reply, so add headers for threading (see MDL-22551)
$userfrom->customheaders[] = 'In-Reply-To: <moodlepost'.$post->parent.'@'.$hostname.'>';
$userfrom->customheaders[] = 'References: <moodlepost'.$post->parent.'@'.$hostname.'>',
}
$postsubject = "$course->shortname: ".format_string($post->subject,true);
$posttext = forum_make_mail_text($course, $forum, $discussion, $post, $userfrom, $userto);