From 415489c9fc0834f30257c8cfb4fa379a0eb351e9 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Tue, 12 Oct 2021 13:58:38 +0200 Subject: [PATCH] NEW : Move of mailing attendies --- .../eventorganization/core/actions_massactions_mail.inc.php | 4 ++-- htdocs/eventorganization/tpl/massactions_mail_pre.tpl.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/eventorganization/core/actions_massactions_mail.inc.php b/htdocs/eventorganization/core/actions_massactions_mail.inc.php index 2f8e2959f2b..5fcada893f9 100644 --- a/htdocs/eventorganization/core/actions_massactions_mail.inc.php +++ b/htdocs/eventorganization/core/actions_massactions_mail.inc.php @@ -90,7 +90,7 @@ if (!$error && $massaction == 'confirm_presend_attendees') { foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); if ($result > 0) { - $attendees = $attendee->fetchAll('', '', 0, 0, array('t.fk_actioncomm' => $objecttmp->id)); + $attendees = $attendee->fetchAll(); if (is_array($attendees) && count($attendees) > 0) { foreach ($attendees as $attmail) { if (!empty($attmail->email)) { @@ -119,7 +119,7 @@ if (!$error && $massaction == 'confirm_presend_attendees') { $receiver = array($receiver); } } - if (!trim($_POST['sendto']) && count($receiver) == 0 && count($listofselectedid) == 1) { // if only one recipient, receiver is mandatory + if (!trim($_POST['sendto']) && count($receiver) == 0 && count($listofselectedid) == 0) { // if only one recipient, receiver is mandatory $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); $massaction = 'presend_attendees'; diff --git a/htdocs/eventorganization/tpl/massactions_mail_pre.tpl.php b/htdocs/eventorganization/tpl/massactions_mail_pre.tpl.php index e4990da6424..8d0836b080e 100644 --- a/htdocs/eventorganization/tpl/massactions_mail_pre.tpl.php +++ b/htdocs/eventorganization/tpl/massactions_mail_pre.tpl.php @@ -37,7 +37,7 @@ if ($massaction == 'presend_attendees') { foreach ($arrayofselected as $toselectid) { $result = $objecttmp->fetch($toselectid); if ($result > 0) { - $attendees = $attendee->fetchAll('', '', 0, 0, array('t.fk_actioncomm'=>$objecttmp->id)); + $attendees = $attendee->fetchAll(); if (is_array($attendees) && count($attendees)>0) { foreach ($attendees as $attmail) { if (!empty($attmail->email)) {