Merge pull request #19200 from frederic34/patch-9

fix warning
This commit is contained in:
Laurent Destailleur 2021-10-31 17:38:23 +01:00 committed by GitHub
commit c0bde3e271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,19 +363,15 @@ if ($result > 0) {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
$listtmp=explode(',', $val); $listtmp=explode(',', $val);
$first=1; $first=1;
foreach($listtmp as $keyemail => $valemail) foreach($listtmp as $keyemail => $valemail) {
{
if (! $first) print ', '; if (! $first) print ', ';
$first=0; $first=0;
$valemail=trim($valemail); $valemail=trim($valemail);
//print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>'; //print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>';
if (isValidEmail($valemail, 1)) if (isValidEmail($valemail, 1)) {
{
if ($valemail == '__SUPERVISOREMAIL__') print $valemail; if ($valemail == '__SUPERVISOREMAIL__') print $valemail;
else print ' &lt;'.$valemail.'&gt;'; else print ' &lt;'.$valemail.'&gt;';
} } else {
else
{
print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail); print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail);
} }
} }
@ -385,8 +381,7 @@ if ($result > 0) {
$notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]); $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]);
$label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode); $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode);
print $label; print $label;
if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) {
{
print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]); print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]);
} }
print '</td>'; print '</td>';
@ -396,9 +391,7 @@ if ($result > 0) {
print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>'; print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>';
print '</tr>'; print '</tr>';
}*/ }*/
/*if ($user->admin) /*if ($user->admin) {
{
$var = ! $var;
print '<tr class="oddeven"><td colspan="4">'; print '<tr class="oddeven"><td colspan="4">';
print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>'; print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>';
print '</td></tr>'; print '</td></tr>';
@ -415,7 +408,7 @@ if ($result > 0) {
// List // List
$sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,"; $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,";
$sql .= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail,"; $sql .= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail, c.statut as status,";
$sql .= " a.code, a.label"; $sql .= " a.code, a.label";
$sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,"; $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
$sql .= " ".MAIN_DB_PREFIX."notify as n"; $sql .= " ".MAIN_DB_PREFIX."notify as n";
@ -489,6 +482,8 @@ if ($result > 0) {
$userstatic->id = $obj->id; $userstatic->id = $obj->id;
$userstatic->lastname = $obj->lastname; $userstatic->lastname = $obj->lastname;
$userstatic->firstname = $obj->firstname; $userstatic->firstname = $obj->firstname;
$userstatic->statut = $obj->status;
$userstatic->email = $obj->email;
print $userstatic->getNomUrl(1); print $userstatic->getNomUrl(1);
print $obj->email ? ' &lt;'.$obj->email.'&gt;' : $langs->trans("NoMail"); print $obj->email ? ' &lt;'.$obj->email.'&gt;' : $langs->trans("NoMail");
} else { } else {
@ -509,8 +504,7 @@ if ($result > 0) {
print '</td>'; print '</td>';
// TODO Add link to object here for other types // TODO Add link to object here for other types
/*print '<td>'; /*print '<td>';
if ($obj->object_type == 'order') if ($obj->object_type == 'order') {
{
$orderstatic->id=$obj->object_id; $orderstatic->id=$obj->object_id;
$orderstatic->ref=... $orderstatic->ref=...
print $orderstatic->getNomUrl(1); print $orderstatic->getNomUrl(1);