diff options
author | msquare <msquare@notrademark.de> | 2016-09-29 09:50:31 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-09-29 09:50:31 +0200 |
commit | 1ec19b46f3311a0235c7d3e119e035559c9b4d14 (patch) | |
tree | 7962acc9cf3b80a4fb75436f6bfd40a7cea899e2 /includes | |
parent | 5170fd7f6ecc90955cc7b32049f9ef9546d425a8 (diff) |
prohibit inline control structures on mailers
Diffstat (limited to 'includes')
-rw-r--r-- | includes/mailer/shifts_mailer.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/mailer/shifts_mailer.php b/includes/mailer/shifts_mailer.php index 8189883a..e1bf422b 100644 --- a/includes/mailer/shifts_mailer.php +++ b/includes/mailer/shifts_mailer.php @@ -48,9 +48,11 @@ function mail_shift_change($old_shift, $new_shift) { $message .= date("Y-m-d H:i", $new_shift["start"]) . " - " . date("H:i", $new_shift["end"]) . "\n"; $message .= $new_room["Name"] . "\n"; - foreach ($users as $user) - if ($user["email_shiftinfo"]) + foreach ($users as $user) { + if ($user["email_shiftinfo"]) { engelsystem_email_to_user($user, '[engelsystem] ' . _("Your Shift has changed"), $message, true); + } + } } function mail_shift_delete($shift) { @@ -64,9 +66,11 @@ function mail_shift_delete($shift) { $message .= date("Y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n"; $message .= $room["Name"] . "\n"; - foreach ($users as $user) - if ($user["email_shiftinfo"]) + foreach ($users as $user) { + if ($user["email_shiftinfo"]) { engelsystem_email_to_user($user, '[engelsystem] ' . _("Your Shift was deleted"), $message, true); + } + } } function mail_shift_assign($user, $shift) { |