From c2cd54325f43f01be686fd06cc8e9ff332c2f2d9 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 8 Apr 2021 11:44:24 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/admin/notification.php | 2 +- htdocs/core/class/notify.class.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 6609021cc2a..d467b6bb62d 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -208,7 +208,7 @@ $langs->trans('notiftouser'), $langs->trans('notiftofixedemail'), $langs->trans('notiftouserandtofixedemail') ); -var_dump($arrayofnotifto,$conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE); +var_dump($arrayofnotifto, $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE); print ''; print $langs->trans("NotificationDisableConfirmMessage").''; print ''; diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 92555da891a..695a17a75d8 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -112,18 +112,18 @@ class Notify $langs->load("mails"); $listofnotiftodo = $this->getNotificationsArray($action, $socid, $object, 0); - if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE)){ - if ($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 1 || $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 3){ - foreach($listofnotiftodo as $val){ - if ($val['type'] == 'touser'){ + if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE)) { + if ($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 1 || $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 3) { + foreach ($listofnotiftodo as $val) { + if ($val['type'] == 'touser') { unset($listofnotiftodo[$val['email']]); $listofnotiftodo = array_merge($listofnotiftodo); } } } - if ($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 2 || $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 3){ - foreach($listofnotiftodo as $val){ - if ($val['type'] == 'tofixedemail'){ + if ($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 2 || $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 3) { + foreach ($listofnotiftodo as $val) { + if ($val['type'] == 'tofixedemail') { unset($listofnotiftodo[$val['email']]); $listofnotiftodo = array_merge($listofnotiftodo); }