NEW : Move of mailing attendies

This commit is contained in:
lmarcouiller 2021-10-12 13:58:38 +02:00
parent 0100cb4192
commit 415489c9fc
2 changed files with 3 additions and 3 deletions

View File

@ -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';

View File

@ -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)) {