Merge pull request #23102 from OPEN-DSI/develop_new_email_subject_in_new_event_title

NEW: Replace event title by the email subject if option activated
This commit is contained in:
Laurent Destailleur 2022-12-06 19:53:33 +01:00 committed by GitHub
commit 0b26997845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -592,6 +592,9 @@ if (!$error && $massaction == 'confirm_presend') {
$objectobj2->actionmsg2 = $actionmsg2; // Short text
$objectobj2->fk_element = $objid2;
$objectobj2->elementtype = $objectobj2->element;
if (!empty($conf->global->MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT)) {
$objectobj2->actionmsg2 = $subjectreplaced; // Short text
}
$triggername = strtoupper(get_class($objectobj2)).'_SENTBYMAIL';
if ($triggername == 'SOCIETE_SENTBYMAIL') {

View File

@ -382,6 +382,9 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
$object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
$object->actionmsg = $message; // Long text
$object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...);
if (!empty($conf->global->MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT)) {
$object->actionmsg2 = $subject; // Short text
}
$object->trackid = $trackid;
$object->fk_element = $object->id;