From 7393abea8f816643a56b98af31c792831cf50e76 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Oct 2021 14:42:26 +0200 Subject: [PATCH] Fix phpcs --- htdocs/contact/list.php | 2 +- htdocs/core/modules/mailings/modules_mailings.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 48cc6fafa61..7397cf8b61f 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -345,7 +345,7 @@ $sql .= " co.label as country, co.code as country_code"; if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); } -if(!empty($conf->mailing->enabled)) { +if (!empty($conf->mailing->enabled)) { $sql .= ", (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) as unsubscribed"; } // Add fields from hooks diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index 1a533591b18..1250c7a9550 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -213,7 +213,7 @@ class MailingTargets // This can't be abstract as it is used for some method $sql .= " AND source_type='thirdparty'"; dol_syslog(__METHOD__.": mailing update status to display thirdparty mail that do not want to be contacted"); $result=$this->db->query($sql); - + //Update the status to show contact mail that don't want to be contacted anymore' $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql .= " SET statut=3"; @@ -222,7 +222,7 @@ class MailingTargets // This can't be abstract as it is used for some method dol_syslog(__METHOD__.": mailing update status to display contact mail that do not want to be contacted",LOG_DEBUG); $result=$this->db->query($sql); */ - + $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql .= " SET statut=3"; $sql .= " WHERE fk_mailing=".((int) $mailing_id)." AND email IN (SELECT mu.email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe AS mu WHERE mu.entity IN ('".getEntity('mailing')."'))";