KazV2/dockers/framadate/patch/create_date_poll.php.patch

18 lines
1.3 KiB
Diff
Raw Permalink Normal View History

2024-06-03 18:43:35 +02:00
--- create_date_poll.php 2022-02-05 09:09:45.256310389 +0100
+++ create_date_poll.php-new 2022-02-05 08:47:40.708265810 +0100
@@ -210,8 +210,12 @@
$message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true));
if ($mailService->isValidEmail($form->admin_mail)) {
- $mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ': ' . Utils::htmlEscape($form->title), $message_admin);
- $mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ': ' . Utils::htmlEscape($form->title), $message);
+ try {
+ $mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ': ' . Utils::htmlEscape($form->title), $message_admin);
+ $mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ': ' . Utils::htmlEscape($form->title), $message);
+ } catch (Exception $e) {
+ $sessionService->set("Framadate", "messageBadEmail", TRUE);
+ }
}
}