Skip to content

Commit

Permalink
Fix Email Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilson Wise committed Nov 1, 2013
1 parent e90f0f5 commit 817bd90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.8.1
v2.8.2
4 changes: 2 additions & 2 deletions controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static function send_emails($week) {
$subject = "{$site_name} Reminder Week {$week}";
$message = "{$obj->username},{$rn}Time is running out to enter your picks!{$rn}{$rn}{$url}{$rn}{$rn}{$rn}{$rn}To change your email reminder settings, go to...{$rn}{$acct}{$rn}";
$headers = "From: {$commissioners}{$rn}Reply-To: {$commissioners}{$rn}X-Mailer: Football Challenge/{$appv} PHP/{$phpv}";
if ($env === 'prod') {
if ($env === ENV_PRODUCTION) {
$log->log('message', sprintf('Reminder email sent to %s', htmlspecialchars($to)));
mail($to, $subject, $message, $headers);
}
Expand All @@ -256,7 +256,7 @@ static function send_emails($week) {
$log->log('error', 'Error getting all the users to email.', $db->error);
}

if ($env === 'prod') {
if ($env === ENV_PRODUCTION) {
// We've sent our reminder, let's update the challenge
if (! $db->qry('UPDATE {{challenges}} SET reminder_sent = 1 WHERE year = %s AND week = %s', FC_YEAR, $week)) {
$log->log('error', 'Error updating the challenges.', $db->error);
Expand Down

0 comments on commit 817bd90

Please sign in to comment.