fix type of recipient when send notification, remove old code

This commit is contained in:
Uwe Steinmann 2021-08-30 16:04:15 +02:00
parent 8018dc1a24
commit 42fdeaf915

View File

@ -71,16 +71,6 @@ if($version->runSubWorkflow($subworkflow)) {
$nl = $document->getNotifyList();
$folder = $document->getFolder();
/*
$subject = "###SITENAME###: ".$document->getName()." - ".getMLText("run_subworkflow_email");
$message = getMLText("run_subwork_email")."\r\n";
$message .=
getMLText("document").": ".$document->getName()."\r\n".
getMLText("workflow").": ".$subworkflow->getName()."\r\n".
getMLText("current_state").": ".$version->getWorkflowState()->getName()."\r\n".
getMLText("user").": ".$user->getFullName()." <". $user->getEmail() ."> ";
*/
$subject = "run_subworkflow_email_subject";
$message = "run_subworkflow_email_body";
$params = array();
@ -96,7 +86,7 @@ if($version->runSubWorkflow($subworkflow)) {
// Send notification to subscribers.
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
foreach ($nl["groups"] as $grp) {
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
}
}
}