mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
take out reviewers and uploaders from recipients
This commit is contained in:
parent
5e478d749d
commit
af066bb15b
|
@ -85,6 +85,16 @@ foreach ($receiptStatus as $i=>$rs) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Get List of ind. reviewers, because they are taken out from the receivers
|
||||
* if added as group.
|
||||
*/
|
||||
$reviewStatus = $latestContent->getReviewStatus();
|
||||
$reviewerids = [];
|
||||
foreach ($reviewStatus as $r) {
|
||||
if($r["type"] == 0 && $r["status"] > -2) {
|
||||
$reviewerids[] = $r['required'];
|
||||
}
|
||||
}
|
||||
// Get the list of proposed recipients, stripping out any duplicates.
|
||||
$pIndRev = (isset($_POST["indRecipients"]) ? array_values(array_unique($_POST["indRecipients"])) : array());
|
||||
// Retrieve the list of recipient groups whose members become individual recipients
|
||||
|
@ -93,6 +103,8 @@ if (isset($_POST["grpIndRecipients"])) {
|
|||
if($group = $dms->getGroup($grp)) {
|
||||
$members = $group->getUsers();
|
||||
foreach($members as $member) {
|
||||
/* Do not add the uploader itself and reviewers */
|
||||
if(!$settings->_enableFilterReceipt || ($member->getID() != $latestContent->getUser()->getID() && !in_array($member->getID(), $reviewerids)))
|
||||
if(!in_array($member->getID(), $pIndRev))
|
||||
$pIndRev[] = $member->getID();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user