mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-19 08:01:39 +00:00
add method sendToAllReceiptMail()
This commit is contained in:
parent
ceddf4d5bf
commit
1033fee1b3
|
@ -1471,6 +1471,35 @@ class SeedDMS_NotificationService {
|
|||
$this->toGroup($user, $recipient, $subject, $message, $params, SeedDMS_NotificationService::RECV_RECIPIENT);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Send a request receipt notification to all recipients of the document content
|
||||
*
|
||||
* This method can be called when the status of a document content changes
|
||||
* to 'released'. The recipients haven't been informed when the
|
||||
* document content was created but not immediatly released.
|
||||
*/
|
||||
public function sendToAllReceiptMail($content, $user) { /* {{{ */
|
||||
$dms = $content->getDMS();
|
||||
|
||||
$receiptStatus = $content->getReceiptStatus();
|
||||
if (!empty($receiptStatus)) {
|
||||
foreach ($receiptStatus as $r) {
|
||||
if($r['status'] == 0) {
|
||||
switch ($r["type"]) {
|
||||
case 0: // Recipient is an individual.
|
||||
if($recipient = $dms->getUser($r["required"]))
|
||||
$this->sendAddReceiptMail($content, $user, $recipient);
|
||||
break;
|
||||
case 1: // Recipient is a group.
|
||||
if($recipient = $dms->getGroup($r["required"]))
|
||||
$this->sendAddReceiptMail($content, $user, $recipient);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
public function sendChangedDocumentOwnerMail($document, $user, $oldowner) { /* {{{ */
|
||||
if($oldowner->getID() != $document->getOwner()->getID()) {
|
||||
$notifyList = $document->getNotifyList();
|
||||
|
|
Loading…
Reference in New Issue
Block a user