FIX #32086 Notifications for Interventions ignores the email template (#38366)

When saving an email template using /admin/mails_templates.php and selecting
interventions as the type of template, it inserted fichinter in the database.

But when looking for templates it tried to find ficheinter - with an extra e.

The result was that it did not find anything, and this did not use the template
at all.

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
This commit is contained in:
Jon Bendtsen 2026-05-21 22:17:40 +02:00 committed by GitHub
parent 3bcbb55e7b
commit 6871e041a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -825,26 +825,26 @@ class Notify
case 'FICHINTER_ADD_CONTACT':
$link = '<a href="'.$urlwithroot.'/fichinter/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
$object_type = 'fichinter';
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionAddedContact", $link);
break;
case 'FICHINTER_VALIDATE':
$link = '<a href="'.$urlwithroot.'/fichinter/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
$object_type = 'fichinter';
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionValidated", $link);
break;
case 'FICHINTER_MODIFY':
$link = '<a href="'.$urlwithroot.'/fichinter/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$context_info = array_key_exists('signature', $object->context) ? $object->getLibSignedStatus() : '';
$dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
$object_type = 'fichinter';
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionModified", $link, $context_info);
break;
case 'FICHINTER_CLOSE':
$link = '<a href="'.$urlwithroot.'/fichinter/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
$object_type = 'fichinter';
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionClosed", $link);
break;
case 'ORDER_SUPPLIER_VALIDATE':
@ -1150,26 +1150,26 @@ class Notify
case 'FICHINTER_ADD_CONTACT':
$link = '<a href="'.$urlwithroot.'/fichinter/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
$object_type = 'fichinter';
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact", $link);
break;
case 'FICHINTER_VALIDATE':
$link = '<a href="'.$urlwithroot.'/fichinter/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->facture->dir_output;
$object_type = 'ficheinter';
$object_type = 'fichinter';
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionValidated", $link);
break;
case 'FICHINTER_MODIFY':
$link = '<a href="'.$urlwithroot.'/fichinter/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$context_info = array_key_exists('signature', $object->context) ? $object->getLibSignedStatus() : '';
$dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
$object_type = 'fichinter';
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionModified", $link, $context_info);
break;
case 'FICHINTER_CLOSE':
$link = '<a href="'.$urlwithroot.'/fichinter/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->facture->dir_output;
$object_type = 'ficheinter';
$object_type = 'fichinter';
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionClosed", $link);
break;
case 'ORDER_SUPPLIER_CANCEL':