MDL-64571 core_message: Fix duplicate footer in msg notification email

This commit is contained in:
cescobedo 2019-02-12 00:43:21 +01:00
parent a62e275984
commit e84312f768
2 changed files with 1 additions and 15 deletions

View File

@ -159,8 +159,7 @@ class manager {
$s = new \stdClass();
$s->sitename = format_string($SITE->shortname, true, array('context' => \context_course::instance(SITEID)));
// When the new interface lands, the URL may be reintroduced, but for now it isn't supported, so just hit the index.
$s->url = $CFG->wwwroot.'/message/index.php';
$s->url = $CFG->wwwroot.'/message/index.php?id='.$eventdata->userfrom->id;
$emailtagline = get_string_manager()->get_string('emailtagline', 'message', $s, $recipient->lang);
$localisedeventdata->fullmessage = $eventdata->fullmessage;

View File

@ -348,19 +348,6 @@ function message_post_message($userfrom, $userto, $message, $format) {
$eventdata->fullmessageformat = $format;
$eventdata->smallmessage = $message;//store the message unfiltered. Clean up on output.
$s = new stdClass();
$s->sitename = format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID)));
$s->url = $CFG->wwwroot.'/message/index.php?user='.$userto->id.'&id='.$userfrom->id;
$emailtagline = get_string_manager()->get_string('emailtagline', 'message', $s, $userto->lang);
if (!empty($eventdata->fullmessage)) {
$eventdata->fullmessage .= "\n\n---------------------------------------------------------------------\n".$emailtagline;
}
if (!empty($eventdata->fullmessagehtml)) {
$eventdata->fullmessagehtml .= "<br /><br />---------------------------------------------------------------------<br />".$emailtagline;
}
$eventdata->timecreated = time();
$eventdata->notification = 0;
return message_send($eventdata);