mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
send notification on submit of reception
This commit is contained in:
parent
6fbfe15baf
commit
4f3a7f6512
|
@ -94,6 +94,29 @@ if(!$controller->run()) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg()));
|
||||
}
|
||||
|
||||
if ($_POST["receiptType"] == "ind" || $_POST["receiptType"] == "grp") {
|
||||
if($notifier) {
|
||||
$nl=$document->getNotifyList();
|
||||
$subject = "receipt_submit_email_subject";
|
||||
$message = "receipt_submit_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $document->getName();
|
||||
$params['version'] = $version;
|
||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||
$params['status'] = getReceiptStatusText($_POST["receiptStatus"]);
|
||||
$params['comment'] = strip_tags($_POST['comment']);
|
||||
$params['username'] = $user->getFullName();
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$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_NOTIFICATION);
|
||||
}
|
||||
$notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
}
|
||||
|
||||
header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=recipients");
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user