From 3e2e3b2bcb20ecbd1218e17a14da2d4a8c71879e Mon Sep 17 00:00:00 2001 From: FHenry Date: Mon, 23 Jul 2012 18:58:40 +0200 Subject: [PATCH 1/6] Correction mail unsubcribe translation --- htdocs/comm/mailing/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 240f8e5c349..db25a3e31ed 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -87,7 +87,7 @@ if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE) $substitutionarrayfortest, array( '__CHECK_READ__' => 'TESTCheckMail', - '__UNSUSCRIBE__' => 'TESTCheckMail' + '__UNSUSCRIBE__' => 'TESTUnsuscribe' ) ); } From bc9d85b03f8782e781274b51f3ea2a56701ffc38 Mon Sep 17 00:00:00 2001 From: FHenry Date: Tue, 24 Jul 2012 09:28:16 +0200 Subject: [PATCH 2/6] Unsubscribe tag spelling correction --- htdocs/comm/mailing/fiche.php | 8 ++++---- scripts/emailings/mailing-send.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index db25a3e31ed..defe2a99fed 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -63,7 +63,7 @@ if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE) $substitutionarray, array( '__CHECK_READ__' => 'CheckMail', - '__UNSUSCRIBE__' => 'Unsuscribe' + '__UNSUBSCRIBE__' => 'Unsubscribe' ) ); } @@ -87,7 +87,7 @@ if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE) $substitutionarrayfortest, array( '__CHECK_READ__' => 'TESTCheckMail', - '__UNSUSCRIBE__' => 'TESTUnsuscribe' + '__UNSUBSCRIBE__' => 'TESTUnsubscribe' ) ); } @@ -209,7 +209,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') '__ID__' => $obj->source_id, '__EMAIL__' => $obj->email, '__CHECK_READ__' => '', - '__UNSUSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', + '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', '__LASTNAME__' => $obj->nom, '__FIRSTNAME__' => $obj->prenom, '__OTHER1__' => $other1, @@ -1049,7 +1049,7 @@ else if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE) { print '__CHECK_READ__ = '.$langs->trans("CheckRead").'
'; - print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'
'; + print '__UNSUBSCRIBE__ = '.$langs->trans("MailUnsubcribe").'
'; } print '__LASTNAME__ = '.$langs->trans("Lastname").'
'; print '__FIRSTNAME__ = '.$langs->trans("Firstname").'
'; diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index 3ccca19e5e8..11f9a883c2b 100644 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -140,7 +140,7 @@ if ($resql) '__ID__' => $obj->source_id, '__EMAIL__' => $obj->email, '__CHECK_READ__' => '', - '__UNSUSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', + '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', '__LASTNAME__' => $obj->lastname, '__FIRSTNAME__' => $obj->firstname, '__OTHER1__' => $other1, From ba9861f8565135cd3177fab91a60162d7054490e Mon Sep 17 00:00:00 2001 From: FHenry Date: Tue, 24 Jul 2012 10:15:58 +0200 Subject: [PATCH 3/6] Add __MAILTOEMAIL__ to mailing-send.php --- scripts/emailings/mailing-send.php | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index 11f9a883c2b..2e012d1f392 100644 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -141,6 +141,7 @@ if ($resql) '__EMAIL__' => $obj->email, '__CHECK_READ__' => '', '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', + '__MAILTOEMAIL__' => ''.$obj->email.'', '__LASTNAME__' => $obj->lastname, '__FIRSTNAME__' => $obj->firstname, '__OTHER1__' => $other1, From 1891e7364af2d54f76faad5ea6b4193dc9da4b3f Mon Sep 17 00:00:00 2001 From: FHenry Date: Tue, 24 Jul 2012 14:32:03 +0200 Subject: [PATCH 4/6] Fix nb mass mailling receive according other status than read --- htdocs/contact/class/contact.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 58356a5f386..b1f37968296 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -806,8 +806,11 @@ class Contact extends CommonObject $sql = "SELECT count(mc.email) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql.= " WHERE mc.email = '".$this->db->escape($this->email)."'"; - $sql.= " AND mc.statut=1"; // -1 erreur, 0 non envoye, 1 envoye avec succes + $sql.= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes $resql=$this->db->query($sql); + + dol_syslog(get_class($this)."::getNbOfEMailings sql=".$sql, LOG_DEBUG); + if ($resql) { $obj = $this->db->fetch_object($resql); From 8a2e5b59622bfb7dabebb3b86cd1606cfb7d311d Mon Sep 17 00:00:00 2001 From: FHenry Date: Tue, 24 Jul 2012 14:34:23 +0200 Subject: [PATCH 5/6] Fix style --- htdocs/contact/class/contact.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index b1f37968296..2abbc3117cc 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -807,10 +807,11 @@ class Contact extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql.= " WHERE mc.email = '".$this->db->escape($this->email)."'"; $sql.= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes - $resql=$this->db->query($sql); dol_syslog(get_class($this)."::getNbOfEMailings sql=".$sql, LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) { $obj = $this->db->fetch_object($resql); From 58e61781e181a80c9f9e3d6182113ce32ed819fc Mon Sep 17 00:00:00 2001 From: FHenry Date: Tue, 24 Jul 2012 17:31:30 +0200 Subject: [PATCH 6/6] Remove useless paramater --- htdocs/admin/company.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index d1f838056d4..399f12a0004 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -759,7 +759,7 @@ else // Forme juridique $var=!$var; print ''.$langs->trans("JuridicalStatus").''; - print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,1); + print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE); print ''; // ProfId1