Skip to content
Snippets Groups Projects
Commit 6124c601 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX Nber of attached files were not reported in event report of email

sent
parent 9fbe96dd
No related branches found
No related tags found
No related merge requests found
...@@ -103,12 +103,11 @@ if (GETPOST('removAll')) ...@@ -103,12 +103,11 @@ if (GETPOST('removAll'))
if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_POST['removAll'] && ! $_POST['removedfile'] && ! $_POST['cancel'] && !$_POST['modelselected']) if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_POST['removAll'] && ! $_POST['removedfile'] && ! $_POST['cancel'] && !$_POST['modelselected'])
{ {
$trackid = GETPOST('trackid','aZ09'); $trackid = GETPOST('trackid','aZ09');
$subject='';$actionmsg='';$actionmsg2='';
if (! empty($conf->dolimail->enabled)) $langs->load("dolimail@dolimail"); if (! empty($conf->dolimail->enabled)) $langs->load("dolimail@dolimail");
$langs->load('mails'); $langs->load('mails');
$subject='';$actionmsg='';$actionmsg2='';
if (is_object($object)) if (is_object($object))
{ {
$result=$object->fetch($id); $result=$object->fetch($id);
...@@ -323,6 +322,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO ...@@ -323,6 +322,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$object->actiontypecode = $actiontypecode; $object->actiontypecode = $actiontypecode;
$object->actionmsg = $actionmsg; // Long text $object->actionmsg = $actionmsg; // Long text
$object->actionmsg2 = $actionmsg2; // Short text $object->actionmsg2 = $actionmsg2; // Short text
$object->trackid = $trackid;
$object->fk_element = $object->id; $object->fk_element = $object->id;
$object->elementtype = $object->element; $object->elementtype = $object->element;
......
...@@ -756,9 +756,9 @@ class InterfaceActionsAuto extends DolibarrTriggers ...@@ -756,9 +756,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
// Add entry in event table // Add entry in event table
$now=dol_now(); $now=dol_now();
if (isset($_SESSION['listofnames'])) if (isset($_SESSION['listofnames-'.$object->trackid]))
{ {
$attachs=$_SESSION['listofnames']; $attachs=$_SESSION['listofnames-'.$object->trackid];
if ($attachs && strpos($action,'SENTBYMAIL')) if ($attachs && strpos($action,'SENTBYMAIL'))
{ {
$object->actionmsg=dol_concatdesc($object->actionmsg, "\n".$langs->transnoentities("AttachedFiles").': '.$attachs); $object->actionmsg=dol_concatdesc($object->actionmsg, "\n".$langs->transnoentities("AttachedFiles").': '.$attachs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment