prohibit inline control structures on mailers

main
msquare 8 years ago
parent 5170fd7f6e
commit 1ec19b46f3

@ -48,10 +48,12 @@ 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 .= date("Y-m-d H:i", $new_shift["start"]) . " - " . date("H:i", $new_shift["end"]) . "\n";
$message .= $new_room["Name"] . "\n"; $message .= $new_room["Name"] . "\n";
foreach ($users as $user) foreach ($users as $user) {
if ($user["email_shiftinfo"]) if ($user["email_shiftinfo"]) {
engelsystem_email_to_user($user, '[engelsystem] ' . _("Your Shift has changed"), $message, true); engelsystem_email_to_user($user, '[engelsystem] ' . _("Your Shift has changed"), $message, true);
} }
}
}
function mail_shift_delete($shift) { function mail_shift_delete($shift) {
$users = ShiftEntries_by_shift($shift["SID"]); $users = ShiftEntries_by_shift($shift["SID"]);
@ -64,10 +66,12 @@ function mail_shift_delete($shift) {
$message .= date("Y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n"; $message .= date("Y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n";
$message .= $room["Name"] . "\n"; $message .= $room["Name"] . "\n";
foreach ($users as $user) foreach ($users as $user) {
if ($user["email_shiftinfo"]) if ($user["email_shiftinfo"]) {
engelsystem_email_to_user($user, '[engelsystem] ' . _("Your Shift was deleted"), $message, true); engelsystem_email_to_user($user, '[engelsystem] ' . _("Your Shift was deleted"), $message, true);
} }
}
}
function mail_shift_assign($user, $shift) { function mail_shift_assign($user, $shift) {
if ($user["email_shiftinfo"]) { if ($user["email_shiftinfo"]) {

Loading…
Cancel
Save