mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
eliminate duplicate mails to the same group
This commit is contained in:
parent
bf1c297594
commit
10e419f7e3
|
@ -117,6 +117,7 @@ if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) {
|
|||
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
|
||||
$usersinformed = array();
|
||||
$groupsinformed = array();
|
||||
foreach($workflow->getNextTransitions($transition->getNextState()) as $ntransition) {
|
||||
foreach($ntransition->getUsers() as $tuser) {
|
||||
if(!in_array($tuser->getUser()->getID(), $usersinformed)) {
|
||||
|
@ -125,11 +126,14 @@ if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) {
|
|||
}
|
||||
}
|
||||
foreach($ntransition->getGroups() as $tuser) {
|
||||
if(!in_array($tuser->getUser()->getID(), $groupsinformed)) {
|
||||
$groupsinformed[] = $tuser->getGroup()->getID();
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_trigger_workflow')));
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user