Skip to content

Commit

Permalink
Add body color to email .... ?
Browse files Browse the repository at this point in the history
Reversed PJ's changes .. should to be working OK without them
  • Loading branch information
moodler committed Jul 22, 2004
1 parent 431b618 commit a033074
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function forum_cron () {
$strforums = get_string('forums', 'forum');
}

global $CFG, $USER;
global $CFG, $USER, $THEME;

if (!empty($USER)) { // Remember real USER account if necessary
$realuser = $USER;
Expand Down Expand Up @@ -364,8 +364,8 @@ function forum_cron () {

/// Override the language and timezone of the "current" user, so that
/// mail is customised for the receiver.
$USER->lang = empty($userto->lang) ? $CFG->lang : $userto->lang;
$USER->timezone = get_user_timezone($userto->timezone);
$USER->lang = $userto->lang;
$USER->timezone = $userto->timezone;


$postsubject = get_string('digestmailsubject', 'forum', $site->shortname);
Expand All @@ -375,7 +375,8 @@ function forum_cron () {

$posttext = get_string('digestmailheader', 'forum', $headerdata)."\n\n";
$headerdata->userprefs = '<a target="_blank" href="'.$headerdata->userprefs.'">'.get_string('digestmailprefs', 'forum').'</a>';
$posthtml = '<p>'.get_string('digestmailheader', 'forum', $headerdata).'</p><br /><hr size="1" noshade="noshade" />';
$posthtml = "<body bgcolor=\"$THEME->cellcontent2\">";
$posthtml .= '<p>'.get_string('digestmailheader', 'forum', $headerdata).'</p><br /><hr size="1" noshade="noshade" />';

foreach($thesediscussions as $discussionid) {
$discussion = $discussions[$discussionid];
Expand Down Expand Up @@ -456,6 +457,7 @@ function forum_cron () {
}
$posthtml .= '<hr size="1" noshade="noshade" /></p>';
}
$posthtml .= '</body>';

if (! email_to_user($userto, $site->shortname, $postsubject, $posttext, $posthtml, '', '', $CFG->forum_replytouser)) {
echo "ERROR!\n";
Expand Down

0 comments on commit a033074

Please sign in to comment.