FIX condition
This commit is contained in:
parent
7c29fb614c
commit
252bd6d9ba
@ -36,11 +36,12 @@ if ($massaction == 'presend')
|
|||||||
{
|
{
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|
||||||
|
$listofselectedid = array();
|
||||||
|
$listofselectedthirdparties = array();
|
||||||
|
$listofselectedref = array();
|
||||||
|
|
||||||
if (! GETPOST('cancel', 'alpha'))
|
if (! GETPOST('cancel', 'alpha'))
|
||||||
{
|
{
|
||||||
$listofselectedid = array();
|
|
||||||
$listofselectedthirdparties = array();
|
|
||||||
$listofselectedref = array();
|
|
||||||
foreach ($arrayofselected as $toselectid)
|
foreach ($arrayofselected as $toselectid)
|
||||||
{
|
{
|
||||||
$result = $objecttmp->fetch($toselectid);
|
$result = $objecttmp->fetch($toselectid);
|
||||||
@ -106,7 +107,7 @@ if ($massaction == 'presend')
|
|||||||
$formmail->withtoreadonly = 1;
|
$formmail->withtoreadonly = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$formmail->withoptiononeemailperrecipient = empty($liste)?0:((GETPOST('oneemailperrecipient')=='on')?1:-1);
|
$formmail->withoptiononeemailperrecipient = (count($listofselectedref) == 1 || empty($liste))? 0 : ((GETPOST('oneemailperrecipient')=='on')?1:-1);
|
||||||
$formmail->withto = empty($liste)?(GETPOST('sendto','alpha')?GETPOST('sendto','alpha'):array()):$liste;
|
$formmail->withto = empty($liste)?(GETPOST('sendto','alpha')?GETPOST('sendto','alpha'):array()):$liste;
|
||||||
$formmail->withtofree = empty($liste)?1:0;
|
$formmail->withtofree = empty($liste)?1:0;
|
||||||
$formmail->withtocc = 1;
|
$formmail->withtocc = 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user