Fix title of emails sents on payment

This commit is contained in:
Laurent Destailleur 2022-10-18 23:31:32 +02:00
parent 2bfc60587e
commit 0db1863429
2 changed files with 5 additions and 19 deletions

View File

@ -136,6 +136,10 @@ foreach ($_POST as $k => $v) {
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_payment');
// Set $appli for emails title
$appli = $mysoc->name;
if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice
// Get on url call
$fulltag = $FULLTAG;
@ -173,21 +177,6 @@ if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice
$from = $conf->global->MAILING_EMAIL_FROM;
$sendto = $sendemail;
// Define link to login card
$appli = constant('DOL_APPLICATION_TITLE');
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
$appli = $conf->global->MAIN_APPLICATION_TITLE;
if (preg_match('/\d\.\d/', $appli)) {
if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) {
$appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core
}
} else {
$appli .= " ".DOL_VERSION;
}
} else {
$appli .= " ".DOL_VERSION;
}
$urlback = $_SERVER["REQUEST_URI"];
$topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentFailed");
$content = "";

View File

@ -1544,10 +1544,7 @@ if ($ispaymentok) {
// Set $appli for emails title
$appli = constant('DOL_APPLICATION_TITLE');
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
$appli = $conf->global->MAIN_APPLICATION_TITLE;
}
$appli = $mysoc->name;
if ($ispaymentok) {