François
2 years ago
8 changed files with 99 additions and 6 deletions
@ -0,0 +1,15 @@ |
|||
--- adminstuds.php 2022-02-05 09:09:45.256310389 +0100
|
|||
+++ adminstuds.php-new 2022-02-05 08:49:40.952269857 +0100
|
|||
@@ -84,6 +84,12 @@
|
|||
$message = new Message('success', __('adminstuds', 'The poll is created.')); |
|||
} |
|||
|
|||
+$messageBadEmail = $sessionService->get("Framadate", "messageBadEmail", FALSE);
|
|||
+if ($messageBadEmail) {
|
|||
+ $sessionService->remove("Framadate", "messageBadEmail");
|
|||
+ $message = new Message('danger', __('adminstuds', "Bad e-mail. Can't send links"));
|
|||
+}
|
|||
+
|
|||
// ------------------------------- |
|||
// Update poll info |
|||
// ------------------------------- |
@ -0,0 +1,17 @@ |
|||
--- create_classic_poll.php 2022-02-05 09:09:45.256310389 +0100
|
|||
+++ create_classic_poll.php-new 2022-02-05 09:03:08.924297050 +0100
|
|||
@@ -83,8 +83,12 @@
|
|||
$message_admin .= sprintf(' :<br/><br/><a href="%1$s">%1$s</a>', 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);
|
|||
+ }
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,17 @@ |
|||
--- 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);
|
|||
+ }
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,10 @@ |
|||
--- locale/en.json 2022-02-05 09:09:45.256310389 +0100
|
|||
+++ locale/en.json-new 2022-02-05 08:52:37.688275805 +0100
|
|||
@@ -439,6 +439,7 @@
|
|||
"Remove the comments": "Remove the comments", |
|||
"Remove the votes": "Remove the votes", |
|||
"The poll is created.": "The poll was created.", |
|||
+ "Bad e-mail. Can't send links": "Bad e-mail. Can't send links",
|
|||
"Vote added": "Vote added", |
|||
"Vote deleted": "Vote deleted", |
|||
"Vote updated": "Vote updated", |
@ -0,0 +1,17 @@ |
|||
--- find_polls.php 2022-02-05 09:09:45.256310389 +0100
|
|||
+++ find_polls.php-new 2022-02-05 09:07:28.072305772 +0100
|
|||
@@ -43,8 +43,12 @@
|
|||
$smarty->assign('polls', $polls); |
|||
$body = $smarty->fetch('mail/find_polls.tpl'); |
|||
|
|||
- $mailService->send($mail, __('FindPolls', 'List of your polls') . ' - ' . NOMAPPLICATION, $body, 'SEND_POLLS');
|
|||
- $message = new Message('success', __('FindPolls', 'Polls sent'));
|
|||
+ try {
|
|||
+ $mailService->send($mail, __('FindPolls', 'List of your polls') . ' - ' . NOMAPPLICATION, $body, 'SEND_POLLS');
|
|||
+ $message = new Message('success', __('FindPolls', 'Polls sent'));
|
|||
+ } catch (Exception $e) {
|
|||
+ $message = new Message('warning', __('Error', 'No polls found'));
|
|||
+ }
|
|||
} else { |
|||
$message = new Message('warning', __('Error', 'No polls found')); |
|||
} |
@ -0,0 +1,10 @@ |
|||
--- locale/fr.json 2022-02-05 09:09:45.256310389 +0100
|
|||
+++ locale/fr.json-new 2022-02-05 08:57:14.468285120 +0100
|
|||
@@ -435,6 +435,7 @@
|
|||
"Remove the comments": "Supprimer les commentaires", |
|||
"Remove the votes": "Supprimer les votes", |
|||
"The poll is created.": "Le sondage a été créé.", |
|||
+ "Bad e-mail. Can't send links": "Mauvais mèl. Les liens n'ont pu être envoyés.",
|
|||
"Vote added": "Vote ajouté", |
|||
"Vote deleted": "Vote supprimé", |
|||
"Vote updated": "Vote mis à jour", |
Loading…
Reference in new issue