From d9b3069813754d88f750edf9bee33149b4bf39d6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 15 Aug 2015 02:34:15 +0200 Subject: [PATCH] Fix: When validation and approval where done in same step, label of action used always label for validation. --- .../triggers/interface_50_modAgenda_ActionsAuto.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 8a77bf86b4f..0912e7aee10 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -678,10 +678,10 @@ class InterfaceActionsAuto extends DolibarrTriggers // Add entry in event table $now=dol_now(); - if(isset($_SESSION['listofnames'])) + if (isset($_SESSION['listofnames'])) { $attachs=$_SESSION['listofnames']; - if($attachs && strpos($action,'SENTBYMAIL')) + if ($attachs && strpos($action,'SENTBYMAIL')) { $object->actionmsg.="\n".$langs->transnoentities("AttachedFiles").': '.$attachs; } @@ -719,6 +719,9 @@ class InterfaceActionsAuto extends DolibarrTriggers $actioncomm->elementtype = $object->element; $ret=$actioncomm->add($user); // User qui saisit l'action + + unset($object->actionmsg); unset($object->actionmsg2); unset($object->actiontypecode); // When several action are called on same object, we must be sure to not reuse vallue of first action. + if ($ret > 0) { $_SESSION['LAST_ACTION_CREATED'] = $ret;