mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
merge notif. list to prevent duplicates
This commit is contained in:
parent
3f6f0dd818
commit
902565fee4
|
@ -338,8 +338,12 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
||||||
|
|
||||||
// Send notification to subscribers of folder.
|
// Send notification to subscribers of folder.
|
||||||
if($notifier) {
|
if($notifier) {
|
||||||
$notifyList1 = $folder->getNotifyList();
|
$fnl = $folder->getNotifyList();
|
||||||
$notifyList2 = $document->getNotifyList();
|
$dnl = $document->getNotifyList();
|
||||||
|
$nl = array(
|
||||||
|
'users'=>array_merge($dnl['users'], $fnl['users']),
|
||||||
|
'groups'=>array_merge($dnl['groups'], $fnl['groups'])
|
||||||
|
);
|
||||||
|
|
||||||
$subject = "new_document_email_subject";
|
$subject = "new_document_email_subject";
|
||||||
$message = "new_document_email_body";
|
$message = "new_document_email_body";
|
||||||
|
@ -353,12 +357,8 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
||||||
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||||
$params['sitename'] = $settings->_siteName;
|
$params['sitename'] = $settings->_siteName;
|
||||||
$params['http_root'] = $settings->_httpRoot;
|
$params['http_root'] = $settings->_httpRoot;
|
||||||
$notifier->toList($user, $notifyList1["users"], $subject, $message, $params);
|
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||||
foreach ($notifyList1["groups"] as $grp) {
|
foreach ($nl["groups"] as $grp) {
|
||||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
|
||||||
}
|
|
||||||
$notifier->toList($user, $notifyList2["users"], $subject, $message, $params);
|
|
||||||
foreach ($notifyList2["groups"] as $grp) {
|
|
||||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user