Merge pull request #31048 from MathildeMar/MathildeMar-patch-1

Fix substitution variables in notification quote signed by customer
This commit is contained in:
Laurent Destailleur 2024-12-05 20:14:16 +01:00 committed by GitHub
commit 3951c94517
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -952,6 +952,9 @@ class Notify
$arraydefaultmessage = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse);
}
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
if (method_exists($object, 'fetch_thirdparty') && empty($object->thirdparty)) {
$object->fetch_thirdparty();
}
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
complete_substitutions_array($substitutionarray, $outputlangs, $object);
$subject = make_substitutions($arraydefaultmessage->topic, $substitutionarray, $outputlangs);