Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-29534 Forum: if forum_replytouser is not set then send forum emai…

…l using noreplyaddress.
  • Loading branch information...
commit be8868900d3ad085f60149bf4bc09744736576a7 1 parent 3c3ca35
@rajeshtaneja rajeshtaneja authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 mod/forum/lib.php
View
9 mod/forum/lib.php
@@ -715,9 +715,9 @@ function forum_cron() {
$eventdata->contexturl = "{$CFG->wwwroot}/mod/forum/discuss.php?d={$discussion->id}#p{$post->id}";
$eventdata->contexturlname = $discussion->name;
- // If forum_replytouser is not set then set mail display to 0.
- if (!$CFG->forum_replytouser) {
- $eventdata->userfrom->maildisplay = 0;
+ // If forum_replytouser is not set then send mail using the noreplyaddress.
+ if (empty($CFG->forum_replytouser)) {
+ $eventdata->userfrom->email = $CFG->noreplyaddress;
}
$mailresult = message_send($eventdata);
@@ -1011,10 +1011,9 @@ function forum_cron() {
}
$attachment = $attachname='';
- $usetrueaddress = true;
// Directly email forum digests rather than sending them via messaging, use the
// site shortname as 'from name', the noreply address will be used by email_to_user.
- $mailresult = email_to_user($userto, $site->shortname, $postsubject, $posttext, $posthtml, $attachment, $attachname, $usetrueaddress);
+ $mailresult = email_to_user($userto, $site->shortname, $postsubject, $posttext, $posthtml, $attachment, $attachname);
if (!$mailresult) {
mtrace("ERROR!");
Please sign in to comment.
Something went wrong with that request. Please try again.