Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
ldestailleur 2025-09-02 22:39:16 +02:00
commit 5b4295912e
6 changed files with 19 additions and 18 deletions

View file

@ -7,9 +7,13 @@ English Dolibarr ChangeLog
For users:
----------
For developers:
---------------
WARNING:
--------
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
@ -207,7 +211,7 @@ The following changes may create regressions for some external modules, but were
***** ChangeLog for 21.0.4 compared to 21.0.3 *****
FIX: #35147 SQL Error on Beluga Export when ExpenseReport is enabled (#35149)
FIX: error when using a code too large in dictionary
FIX: Security when using feature Advanced Target of emailing (hidden in v21, default in v22+). Possible
FIX: Security when using Advanced Target page of emailing (feature hidden in v21, default in v22+). Possible
SQL injection by users with permission to make and send mass emailing.

View file

@ -1667,10 +1667,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnValid()), $substitutionarray, $outputlangs);
$tmp = $langs->trans("SendingAnEMailToMember");
$tmp .= '<br>'.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM').'</b>, ';
$tmp .= '<br>'.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'</b>, ';
$tmp .= '<br>'.$langs->trans("MailRecipient").': <b>'.$object->email.'</b>';
$helpcontent = '';
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM').'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
$helpcontent .= $subjecttosend."\n";
@ -1731,10 +1731,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnResiliate()), $substitutionarray, $outputlangs);
$tmp = $langs->trans("SendingAnEMailToMember");
$tmp .= '<br>('.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM').'</b>, ';
$tmp .= '<br>('.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'</b>, ';
$tmp .= $langs->trans("MailRecipient").': <b>'.$object->email.'</b>)';
$helpcontent = '';
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM').'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
$helpcontent .= $subjecttosend."\n";
@ -1792,10 +1792,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnExclude()), $substitutionarray, $outputlangs);
$tmp = $langs->trans("SendingAnEMailToMember");
$tmp .= '<br>('.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM').'</b>, ';
$tmp .= '<br>('.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'</b>, ';
$tmp .= $langs->trans("MailRecipient").': <b>'.$object->email.'</b>)';
$helpcontent = '';
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM').'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
$helpcontent .= $subjecttosend."\n";

View file

@ -505,11 +505,8 @@ class Adherent extends CommonObject
$texttosend = dol_htmlentitiesbr($texttosend);
}
// Envoi mail confirmation
$from = $conf->email_from;
if (getDolGlobalString('ADHERENT_MAIL_FROM')) {
$from = getDolGlobalString('ADHERENT_MAIL_FROM');
}
// Send mail confirmation
$from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from);
$trackid = 'mem'.$this->id;
@ -3188,7 +3185,7 @@ class Adherent extends CommonObject
$subject = make_substitutions($arraydefaultmessage->topic, $substitutionarray, $outputlangs);
$msg = make_substitutions($arraydefaultmessage->content, $substitutionarray, $outputlangs);
$from = getDolGlobalString('ADHERENT_MAIL_FROM');
$from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from);
$to = $adherent->email;
$cc = getDolGlobalString('ADHERENT_CC_MAIL_FROM');

View file

@ -1187,7 +1187,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
$tmp = '<input name="sendmail" type="checkbox"'.(GETPOST('sendmail', 'alpha') ? ' checked' : (getDolGlobalString('ADHERENT_DEFAULT_SENDINFOBYMAIL') ? ' checked' : '')).'>';
$helpcontent = '';
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM').'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailTopic").'</b>:<br>'."\n";
if ($subjecttosend) {

View file

@ -640,7 +640,7 @@ Module240Desc=Tool to export Dolibarr data (with assistance)
Module250Name=Data imports
Module250Desc=Tool to import data into Dolibarr (with assistance)
Module310Name=Members
Module310Desc=Foundation members management
Module310Desc=Management of association members and their membership
Module320Name=RSS Feed
Module320Desc=Add a RSS feed to Dolibarr pages
Module330Name=Bookmarks & Shortcuts

View file

@ -421,13 +421,13 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
$appli .= " ".DOL_VERSION;
}
$to = $adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL);
$from = getDolGlobalString('ADHERENT_MAIL_FROM');
$to = $adh->makeSubstitution(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL'));
$from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from);
$mailfile = new CMailFile(
'['.$appli.'] ' . getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'),
$to,
$from,
$adh->makeSubstitution($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL),
$adh->makeSubstitution(getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL')),
array(),
array(),
array(),