Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

forum MDL-22551 Don't put In-Reply-To and References headers on the f…

…irst post for a thread
  • Loading branch information...
commit 436f4e07579c7023e2436b4320c17bedd4feb088 1 parent 86254f7
@moodler moodler authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/forum/lib.php
View
6 mod/forum/lib.php
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.