From fe6fb12d189825fdec451cb9dfe4ca69be0f7d13 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 17:13:23 +0200 Subject: [PATCH] Fix missing link --- htdocs/core/class/notify.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 7a3508c7d2f..c0258bdec90 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -314,6 +314,7 @@ class Notify global $user, $conf, $langs, $mysoc; global $hookmanager; global $dolibarr_main_url_root; + global $action; if (!in_array($notifcode, $this->arrayofnotifsupported)) return 0; @@ -526,6 +527,8 @@ class Notify if ($link) $message .= "\n".$urlwithroot.$link; $parameters = array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list); + if (!isset($action)) $action = ''; + $reshook = $hookmanager->executeHooks('formatNotificationMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { @@ -700,21 +703,25 @@ class Notify $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref); break; case 'EXPENSE_REPORT_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref); break; case 'EXPENSE_REPORT_APPROVE': + $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref); break; case 'HOLIDAY_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref); break; case 'HOLIDAY_APPROVE': + $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref);