Fix regression

This commit is contained in:
Laurent Destailleur 2018-08-29 11:57:43 +02:00
parent 0eb4f8bb96
commit b648a28893

View File

@ -303,9 +303,11 @@ if ($object->fetch($id) >= 0)
// Sort $modulenames // Sort $modulenames
sort($modulenames); sort($modulenames);
$var = true;
// Loop on each submodule // Loop on each submodule
foreach($modulenames as $modulename) foreach($modulenames as $modulename)
{ {
// Loading Class // Loading Class
$file = $dir.$modulename.".modules.php"; $file = $dir.$modulename.".modules.php";
$classname = "mailing_".$modulename; $classname = "mailing_".$modulename;
@ -326,14 +328,18 @@ if ($object->fetch($id) >= 0)
} }
// Si le module mailing est qualifie // Si le module mailing est qualifie
if ($qualified)
{
$var = ! $var;
if ($allowaddtarget) if ($allowaddtarget)
{ {
print '<form class="oddeven tagtr" name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">'; print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
} }
else else
{ {
print '<div class="oddeven tagtr">'; print '<div '.$bctag[$var].'>';
} }
print '<div class="tagtd">'; print '<div class="tagtd">';