Fix missing link

Conflicts:
	htdocs/core/class/notify.class.php
This commit is contained in:
Laurent Destailleur 2020-04-27 17:13:23 +02:00
parent 10ab97944a
commit a0c013d87b

View File

@ -314,6 +314,7 @@ class Notify
global $user,$conf,$langs,$mysoc; global $user,$conf,$langs,$mysoc;
global $hookmanager; global $hookmanager;
global $dolibarr_main_url_root; global $dolibarr_main_url_root;
global $action;
if (! in_array($notifcode, $this->arrayofnotifsupported)) return 0; if (! in_array($notifcode, $this->arrayofnotifsupported)) return 0;
@ -524,8 +525,10 @@ class Notify
$message.= $mesg; $message.= $mesg;
if ($link) $message.= "\n" . $urlwithroot . $link; if ($link) $message.= "\n" . $urlwithroot . $link;
$parameters=array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list); $parameters = array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list);
$reshook=$hookmanager->executeHooks('formatNotificationMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks 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)) if (empty($reshook))
{ {
if (! empty($hookmanager->resArray['subject'])) $subject.=$hookmanager->resArray['subject']; if (! empty($hookmanager->resArray['subject'])) $subject.=$hookmanager->resArray['subject'];
@ -694,21 +697,25 @@ class Notify
$mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref); $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref);
break; break;
case 'EXPENSE_REPORT_VALIDATE': case 'EXPENSE_REPORT_VALIDATE':
$link = '<a href="'.$urlwithroot.'/expensereport/card.php?id='.$object->id.'">'.$newref.'</a>';
$dir_output = $conf->expensereport->dir_output; $dir_output = $conf->expensereport->dir_output;
$object_type = 'expensereport'; $object_type = 'expensereport';
$mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref); $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref);
break; break;
case 'EXPENSE_REPORT_APPROVE': case 'EXPENSE_REPORT_APPROVE':
$link = '<a href="'.$urlwithroot.'/expensereport/card.php?id='.$object->id.'">'.$newref.'</a>';
$dir_output = $conf->expensereport->dir_output; $dir_output = $conf->expensereport->dir_output;
$object_type = 'expensereport'; $object_type = 'expensereport';
$mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref); $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref);
break; break;
case 'HOLIDAY_VALIDATE': case 'HOLIDAY_VALIDATE':
$link = '<a href="'.$urlwithroot.'/holiday/card.php?id='.$object->id.'">'.$newref.'</a>';
$dir_output = $conf->holiday->dir_output; $dir_output = $conf->holiday->dir_output;
$object_type = 'holiday'; $object_type = 'holiday';
$mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref); $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref);
break; break;
case 'HOLIDAY_APPROVE': case 'HOLIDAY_APPROVE':
$link = '<a href="'.$urlwithroot.'/holiday/card.php?id='.$object->id.'">'.$newref.'</a>';
$dir_output = $conf->holiday->dir_output; $dir_output = $conf->holiday->dir_output;
$object_type = 'holiday'; $object_type = 'holiday';
$mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref); $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref);