From fcec48ea7f88a8035f4d6b8ce597bdd2dfb63bc6 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 20 Dec 2022 21:16:17 +0100 Subject: [PATCH] Update mailing-read.php --- htdocs/public/emailing/mailing-read.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/public/emailing/mailing-read.php b/htdocs/public/emailing/mailing-read.php index 1c2bd6cea98..5829c62dbd7 100644 --- a/htdocs/public/emailing/mailing-read.php +++ b/htdocs/public/emailing/mailing-read.php @@ -46,8 +46,8 @@ if (!defined('NOREQUIREMENU')) { if (!defined('NOIPCHECK')) { define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip } -if (!defined("NOSESSION")) { - define("NOSESSION", '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); } /** @@ -58,6 +58,8 @@ if (!defined("NOSESSION")) { function llxHeader() { } + + /** * Footer empty * @@ -121,19 +123,19 @@ if (!empty($tag)) { } */ - //Update status of target + // Update status of target $statut = '2'; $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".((int) $statut)." WHERE rowid = ".((int) $obj->rowid); $resql = $db->query($sql); if (!$resql) dol_print_error($db); - //Update status communication of thirdparty prospect + // Update status communication of thirdparty prospect if ($obj->source_id > 0 && $obj->source_type == 'thirdparty' && $obj->entity) { $sql = "UPDATE ".MAIN_DB_PREFIX.'societe SET fk_stcomm = 3 WHERE fk_stcomm <> -1 AND entity = '.((int) $obj->entity).' AND rowid = '.((int) $obj->source_id); $resql = $db->query($sql); } - //Update status communication of contact prospect + // Update status communication of contact prospect if ($obj->source_id > 0 && $obj->source_type == 'contact' && $obj->entity) { $sql = "UPDATE ".MAIN_DB_PREFIX.'societe SET fk_stcomm = 3 WHERE fk_stcomm <> -1 AND entity = '.((int) $obj->entity).' AND rowid IN (SELECT sc.fk_soc FROM '.MAIN_DB_PREFIX.'socpeople AS sc WHERE sc.rowid = '.((int) $obj->source_id).')'; $resql = $db->query($sql);