From 669336e306b337e942bae95d3517b667695345d7 Mon Sep 17 00:00:00 2001
From: "cedric@yterium.com" <>
Date: Fri, 14 Dec 2018 15:04:08 +0000
Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20option=20graceful=20sur=20les?=
=?UTF-8?q?=20envois=20qui=20evite=20d'envoyer=20la=20meme=20newsletter=20?=
=?UTF-8?q?a=20un=20email=20qui=20l'a=20deja=20recue=20Cela=20s'accompagne?=
=?UTF-8?q?=20d'une=20option=20dans=20le=20formulaire=20d'envoi,=20sur=20l?=
=?UTF-8?q?es=20newsletters,=20decochee=20par=20defaut=20:=20[=20]=20Envoy?=
=?UTF-8?q?er=20=C3=A0=20nouveau=20aux=20destinataires=20qui=20l'ont=20d?=
=?UTF-8?q?=C3=A9j=C3=A0=20re=C3=A7ue=20(par=20defaut=20donc,=20desormais,?=
=?UTF-8?q?=20on=20n'envoie=20plus=20en=20double)=20Techniquement=20il=20y?=
=?UTF-8?q?=20a=20un=20champ=20graceful=20en=20base=20sur=20les=20mailshot?=
=?UTF-8?q?s.=20Par=20contre=20quand=20on=20construit=20la=20liste=20des?=
=?UTF-8?q?=20destinataires=20on=20enumere=20bien=20tous=20les=20destinata?=
=?UTF-8?q?ires=20comme=20avant,=20mais=20simplement=20pour=20chaque=20env?=
=?UTF-8?q?oi=20on=20verifie=20d'abord=20si=20cet=20email=20a=20deja=20rec?=
=?UTF-8?q?u=20la=20newsletter=20et=20si=20oui=20on=20recupere=20directeme?=
=?UTF-8?q?nt=20le=20statut=20et=20la=20date=20du=20dernier=20envoi=20sans?=
=?UTF-8?q?=20rien=20faire=20(le=20destinataire=20apparait=20donc=20bien?=
=?UTF-8?q?=20dans=20la=20liste,=20en=20sent=20ou=20read=20ou=20open,=20av?=
=?UTF-8?q?ec=20la=20date=20de=20l'envoi=20precedent)=20A=20priori=20ca=20?=
=?UTF-8?q?doit=20marcher,=20mais=20je=20n'ai=20pas=20encore=20teste=20en?=
=?UTF-8?q?=20live?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
base/mailshot.php | 1 +
formulaires/newsletter_send.html | 11 +++
formulaires/newsletter_send.php | 4 +
inc/mailshot.php | 131 +++++++++++++++++++++----
lang/mailshot_fr.php | 1 +
lang/newsletter_fr.php | 1 +
mailshot_administrations.php | 3 +
newsletter/bulkstart.php | 4 +-
paquet.xml | 4 +-
prive/objets/contenu/mailshot.html | 7 +-
prive/style_prive_plugin_mailshot.html | 11 ++-
11 files changed, 152 insertions(+), 26 deletions(-)
diff --git a/base/mailshot.php b/base/mailshot.php
index a3a7c86..d70091e 100644
--- a/base/mailshot.php
+++ b/base/mailshot.php
@@ -39,6 +39,7 @@ function mailshot_declarer_tables_objets_sql($tables) {
"html" => "longtext NOT NULL DEFAULT ''",
"texte" => "longtext NOT NULL DEFAULT ''",
"listes" => "text NOT NULL DEFAULT ''",
+ "graceful" => "tinyint(1) NOT NULL DEFAULT 0",
"from_name" => "text NOT NULL DEFAULT ''",
"from_email" => "text NOT NULL DEFAULT ''",
"total" => "bigint(21) NOT NULL",
diff --git a/formulaires/newsletter_send.html b/formulaires/newsletter_send.html
index 9537379..bd58ca3 100644
--- a/formulaires/newsletter_send.html
+++ b/formulaires/newsletter_send.html
@@ -33,6 +33,17 @@
+ #SET{name,resend}#SET{obli,''}#SET{defaut,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
+
[
+ (#GET{erreurs})
+ ]
+ #SET{val,non}
+
+ #SET{val,oui}
+
+
+
+
#SET{name,date_start}#SET{obli,''}#SET{defaut,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}