Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0dde394
)
MDL-30698 forum: made message ID genuinely unique to prevent mail servers dropping...
author
Andrew Davis
<andrew@moodle.com>
Wed, 14 Dec 2011 10:23:01 +0000
(18:23 +0800)
committer
Andrew Davis
<andrew@moodle.com>
Fri, 17 Feb 2012 02:21:02 +0000
(09:21 +0700)
mod/forum/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/forum/lib.php
b/mod/forum/lib.php
index
f36d56e
..
5819b43
100644
(file)
--- a/
mod/forum/lib.php
+++ b/
mod/forum/lib.php
@@
-365,6
+365,9
@@
WHERE
return $result;
}
return $result;
}
+function forum_get_email_message_id($postid, $usertoid, $hostname) {
+ return '<moodlepost'.$postid.'to'.$usertoid.'@'.$hostname.'>';
+}
/**
* Function to be run periodically according to the moodle cron
/**
* Function to be run periodically according to the moodle cron
@@
-603,14
+606,14
@@
function forum_cron() {
'Precedence: Bulk',
'List-Id: "'.$cleanforumname.'" <moodleforum'.$forum->id.'@'.$hostname.'>',
'List-Help: '.$CFG->wwwroot.'/mod/forum/view.php?f='.$forum->id,
'Precedence: Bulk',
'List-Id: "'.$cleanforumname.'" <moodleforum'.$forum->id.'@'.$hostname.'>',
'List-Help: '.$CFG->wwwroot.'/mod/forum/view.php?f='.$forum->id,
- 'Message-ID:
<moodlepost'.$post->id.'@'.$hostname.'>'
,
+ 'Message-ID:
'.forum_get_email_message_id($post->id, $userto->id, $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)
'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.'>'
;
+ $userfrom->customheaders[] = 'In-Reply-To:
'.forum_get_email_message_id($post->parent, $userto->id, $hostname)
;
+ $userfrom->customheaders[] = 'References:
'.forum_get_email_message_id($post->parent, $userto->id, $hostname)
;
}
$shortname = format_string($course->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
}
$shortname = format_string($course->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));