mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-01-24 01:59:14 +00:00
send request receipt notification only if document is released
This commit is contained in:
parent
1033fee1b3
commit
ec6c4855fc
|
|
@ -498,9 +498,20 @@ foreach($file_ary as $file) {
|
|||
if($controller->hasHook('cleanUpDocument')) {
|
||||
$controller->callHook('cleanUpDocument', $document, $file);
|
||||
}
|
||||
// Send notification to subscribers of folder.
|
||||
if($notifier) {
|
||||
// Send notification to subscribers of folder.
|
||||
$notifier->sendNewDocumentMail($document, $user);
|
||||
|
||||
// Send notifcation to recipients of document
|
||||
$content = $document->getLatestContent();
|
||||
$status = $content->getStatus();
|
||||
if ($status["status"] == S_RELEASED) {
|
||||
if ($settings->_enableNotificationAppRev) {
|
||||
if ($notifier) {
|
||||
$notifier->sendToAllReceiptMail($content, $user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($settings->_removeFromDropFolder) {
|
||||
if(file_exists($userfiletmp)) {
|
||||
|
|
|
|||
|
|
@ -111,6 +111,13 @@ if(!$controller()) {
|
|||
$notifier->sendSubmittedApprovalMail($latestContent, $user, $approvelog ? $approvelog[0] : false);
|
||||
if($controller->oldstatus != $controller->newstatus)
|
||||
$notifier->sendChangedDocumentStatusMail($latestContent, $user, $controller->oldstatus);
|
||||
if ($controller->newstatus == S_RELEASED) {
|
||||
if ($settings->_enableNotificationAppRev) {
|
||||
if ($notifier) {
|
||||
$notifier->sendToAllReceiptMail($content, $user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,9 +85,16 @@ if ($overrideStatus != $overallStatus["status"]) {
|
|||
if (!$content->setStatus($overrideStatus, $comment, $user)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
} else {
|
||||
// Send notification to subscribers.
|
||||
if($notifier) {
|
||||
if ($notifier) {
|
||||
// Send notification to subscribers.
|
||||
$notifier->sendChangedDocumentStatusMail($content, $user, $overallStatus["status"]);
|
||||
|
||||
// Send request for receipt notification
|
||||
if ($overrideStatus == S_RELEASED) {
|
||||
if ($settings->_enableNotificationAppRev) {
|
||||
$notifier->sendToAllReceiptMail($content, $user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ foreach ($docAccess["groups"] as $i=>$da) {
|
|||
$accessIndex["g"][$da->getID()] = $da;
|
||||
}
|
||||
|
||||
$status = $content->getStatus();
|
||||
|
||||
// Retrieve list of currently assigned recipients, along with
|
||||
// their latest status.
|
||||
$receiptStatus = $content->getReceiptStatus();
|
||||
|
|
@ -137,10 +139,13 @@ foreach ($pIndRev as $p) {
|
|||
// email error
|
||||
break;
|
||||
default:
|
||||
// Send an email notification to the new recipient.
|
||||
if($settings->_enableNotificationAppRev) {
|
||||
if ($notifier) {
|
||||
$notifier->sendAddReceiptMail($content, $user, $accessIndex["i"][$p]);
|
||||
// Send an email notification to the new recipient only if the document
|
||||
// is already released
|
||||
if ($status["status"] == S_RELEASED) {
|
||||
if($settings->_enableNotificationAppRev) {
|
||||
if ($notifier) {
|
||||
$notifier->sendAddReceiptMail($content, $user, $accessIndex["i"][$p]);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -218,10 +223,13 @@ foreach ($pGrpRev as $p) {
|
|||
// email error
|
||||
break;
|
||||
default:
|
||||
// Send an email notification to the new recipient.
|
||||
if($settings->_enableNotificationAppRev) {
|
||||
if ($notifier) {
|
||||
$notifier->sendAddReceiptMail($content, $user, $accessIndex["g"][$p]);
|
||||
// Send an email notification to the new recipient only if the document
|
||||
// is already released
|
||||
if ($status["status"] == S_RELEASED) {
|
||||
if($settings->_enableNotificationAppRev) {
|
||||
if ($notifier) {
|
||||
$notifier->sendAddReceiptMail($content, $user, $accessIndex["g"][$p]);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -403,6 +403,15 @@ default:
|
|||
$notifier->sendNewDocumentVersionMail($document, $user);
|
||||
|
||||
$notifier->sendChangedExpiryMail($document, $user, $oldexpires);
|
||||
|
||||
$status = $content->getStatus();
|
||||
if ($status["status"] == S_RELEASED) {
|
||||
if ($settings->_enableNotificationAppRev) {
|
||||
if ($notifier) {
|
||||
$notifier->sendToAllReceiptMail($content, $user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($settings->_removeFromDropFolder) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user