mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
pass type of notification receiver in each call of notification service
This commit is contained in:
parent
8e2682dcf0
commit
862f8dffb3
|
@ -421,9 +421,9 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
if($workflow && $settings->_enableNotificationWorkflow) {
|
||||
|
@ -442,10 +442,10 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
|
||||
foreach($workflow->getNextTransitions($workflow->getInitState()) as $ntransition) {
|
||||
foreach($ntransition->getUsers() as $tuser) {
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
foreach($ntransition->getGroups() as $tuser) {
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -466,10 +466,10 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
foreach($reviewers['i'] as $reviewerid) {
|
||||
$notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
foreach($reviewers['g'] as $reviewergrpid) {
|
||||
$notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -487,10 +487,10 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
foreach($approvers['i'] as $approverid) {
|
||||
$notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
foreach($approvers['g'] as $approvergrpid) {
|
||||
$notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,9 +123,9 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,9 +139,9 @@ if(!$subFolder = $controller->run()) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$subFolder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -473,9 +473,9 @@ switch($command) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$parent->getID();
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
|
@ -529,9 +529,9 @@ switch($command) {
|
|||
$params['username'] = $user->getFullName();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -830,9 +830,9 @@ switch($command) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
if($workflow && $settings->_enableNotificationWorkflow) {
|
||||
|
@ -851,10 +851,10 @@ switch($command) {
|
|||
|
||||
foreach($workflow->getNextTransitions($workflow->getInitState()) as $ntransition) {
|
||||
foreach($ntransition->getUsers() as $tuser) {
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
foreach($ntransition->getGroups() as $tuser) {
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -875,10 +875,10 @@ switch($command) {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
foreach($reviewers['i'] as $reviewerid) {
|
||||
$notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
foreach($reviewers['g'] as $reviewergrpid) {
|
||||
$notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -896,10 +896,10 @@ switch($command) {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
foreach($approvers['i'] as $approverid) {
|
||||
$notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
foreach($approvers['g'] as $approvergrpid) {
|
||||
$notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,13 +115,13 @@ if ($_POST["approvalType"] == "ind") {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
|
||||
$notifier->toIndividual($user, $content->getUser(), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
|
||||
// Send notification to subscribers.
|
||||
$nl=$document->getNotifyList();
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,13 +153,13 @@ else if ($_POST["approvalType"] == "grp") {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
|
||||
$notifier->toIndividual($user, $content->getUser(), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
|
||||
// Send notification to subscribers.
|
||||
$nl=$document->getNotifyList();
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -188,9 +188,9 @@ if ($_POST["approvalStatus"]==-1){
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,9 +240,9 @@ if ($_POST["approvalStatus"]==-1){
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -160,11 +160,11 @@ if ($action == "setowner") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// $notifier->toIndividual($user, $oldowner, $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $oldowner, $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_setowner')));
|
||||
}
|
||||
|
@ -185,9 +185,9 @@ else if ($action == "notinherit") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -208,9 +208,9 @@ else if ($action == "inherit") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_inherit_access')));
|
||||
|
@ -230,9 +230,9 @@ else if ($action == "setdefault") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_set_default_access')));
|
||||
|
|
|
@ -112,10 +112,10 @@ if ($action == "delnotify"){
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
if ($userid > 0) {
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
else {
|
||||
$notifier->toGroup($user, $obj, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -154,7 +154,7 @@ else if ($action == "addnotify") {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -188,7 +188,7 @@ else if ($action == "addnotify") {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toGroup($user, $obj, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -114,9 +114,9 @@ if($oldattributes) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,9 +142,9 @@ if($newattributes) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,9 +103,9 @@ if (($oldcomment = $version->getComment()) != $comment) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."&version=".$version->getVersion();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -167,11 +167,11 @@ if ($oldname != $name) {
|
|||
// if user is not owner send notification to owner
|
||||
if ($user->getID() != $document->getOwner()->getID() &&
|
||||
false === SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
|
||||
$notifyList['users'][] = $document->getOwner();
|
||||
$notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -196,11 +196,11 @@ if ($oldcomment != $comment) {
|
|||
// if user is not owner send notification to owner
|
||||
if ($user->getID() != $document->getOwner()->getID() &&
|
||||
false === SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
|
||||
$notifyList['users'][] = $document->getOwner();
|
||||
$notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -223,11 +223,11 @@ if ($expires != $oldexpires) {
|
|||
// if user is not owner send notification to owner
|
||||
if ($user->getID() != $document->getOwner()->getID() &&
|
||||
false === SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
|
||||
$notifyList['users'][] = $document->getOwner();
|
||||
$notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -254,9 +254,9 @@ if($oldattributes) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -281,9 +281,9 @@ if($newattributes) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,13 +112,13 @@ if($oldname != $name) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// if user is not owner send notification to owner
|
||||
// if ($user->getID() != $folder->getOwner()->getID())
|
||||
// $notifier->toIndividual($user, $folder->getOwner(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $folder->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,13 +138,13 @@ if($oldcomment != $comment) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// if user is not owner send notification to owner
|
||||
// if ($user->getID() != $folder->getOwner()->getID())
|
||||
// $notifier->toIndividual($user, $folder->getOwner(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $folder->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -168,9 +168,9 @@ if($oldattributes) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -195,9 +195,9 @@ if($newattributes) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,9 +78,9 @@ if($lc->getChecksum() == SeedDMS_Core_File::checksum($tmpfname)) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
echo json_encode(array('success'=>true, 'message'=>getMLText('splash_saved_file')));
|
||||
|
|
|
@ -140,9 +140,9 @@ if ($action == "setowner") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_setowner')));
|
||||
|
@ -171,9 +171,9 @@ else if ($action == "notinherit") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_notinherit_access')));
|
||||
}
|
||||
|
@ -194,9 +194,9 @@ else if ($action == "notinherit") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -233,9 +233,9 @@ else if ($action == "inherit") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_inherit_access')));
|
||||
|
@ -260,9 +260,9 @@ else if ($action == "setdefault") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_set_default_access')));
|
||||
|
|
|
@ -107,10 +107,10 @@ if ($action == "delnotify") {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
if ($userid > 0) {
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
else {
|
||||
$notifier->toGroup($user, $obj, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -149,7 +149,7 @@ else if ($action == "addnotify") {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -184,7 +184,7 @@ else if ($action == "addnotify") {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toGroup($user, $obj, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ if ($user->isGuest()) {
|
|||
UI::exitError(getMLText("my_account"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
function add_folder_notify($folder,$userid,$recursefolder,$recursedoc) {
|
||||
function add_folder_notify($folder,$userid,$recursefolder,$recursedoc) { /* {{{ */
|
||||
global $dms;
|
||||
|
||||
$folder->addNotify($userid, true);
|
||||
|
@ -55,7 +55,7 @@ function add_folder_notify($folder,$userid,$recursefolder,$recursedoc) {
|
|||
foreach($subFolders as $subFolder)
|
||||
add_folder_notify($subFolder,$userid,$recursefolder,$recursedoc);
|
||||
}
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
if (!isset($_GET["type"])) UI::exitError(getMLText("my_account"),getMLText("error_occured"));
|
||||
if (!isset($_GET["action"])) UI::exitError(getMLText("my_account"),getMLText("error_occured"));
|
||||
|
@ -123,7 +123,7 @@ if ($_GET["type"]=="document"){
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $obj, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,13 +73,13 @@ foreach($clipboard['docs'] as $documentid) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// if user is not owner send notification to owner
|
||||
// if ($user->getID() != $document->getOwner()->getID())
|
||||
// $notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
$session->removeFromClipboard($document);
|
||||
|
||||
|
@ -120,13 +120,13 @@ foreach($clipboard['folders'] as $folderid) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// if user is not owner send notification to owner
|
||||
// if ($user->getID() != $folder->getOwner()->getID())
|
||||
// $notifier->toIndividual($user, $folder->getOwner(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $folder->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
|
||||
}
|
||||
$session->removeFromClipboard($folder);
|
||||
|
|
|
@ -99,13 +99,13 @@ if ($document->setFolder($targetFolder)) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// if user is not owner send notification to owner
|
||||
// if ($user->getID() != $document->getOwner()->getID())
|
||||
// $notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
@ -98,13 +98,13 @@ if ($folder->setParent($targetFolder)) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// if user is not owner send notification to owner
|
||||
//if ($user->getID() != $folder->getOwner()->getID())
|
||||
// $notifier->toIndividual($user, $folder->getOwner(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $folder->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -92,12 +92,12 @@ if ($overrideStatus != $overallStatus["status"]) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,9 +98,9 @@ if ($notifier){
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,9 +78,9 @@ if (!$document->removeDocumentFile($fileid)) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,9 +94,9 @@ if ($notifier) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$parent->getID();
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -92,9 +92,9 @@ if (count($document->getContent())==1) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,25 +103,27 @@ else {
|
|||
/* Before deleting the content get a list of all users that should
|
||||
* be informed about the removal.
|
||||
*/
|
||||
$emailUserList = array();
|
||||
$emailUserList[] = $version->getUser()->getID();
|
||||
$emailGroupList = array();
|
||||
$emailUserListR = array();
|
||||
$emailUserListA = array();
|
||||
$oldowner = $version->getUser();
|
||||
$emailGroupListR = array();
|
||||
$emailGroupListA = array();
|
||||
$status = $version->getReviewStatus();
|
||||
foreach ($status as $st) {
|
||||
if ($st["status"]==0 && !in_array($st["required"], $emailUserList)) {
|
||||
if($st['type'] == 0)
|
||||
$emailUserList[] = $st["required"];
|
||||
$emailUserListR[] = $st["required"];
|
||||
else
|
||||
$emailGroupList[] = $st["required"];
|
||||
$emailGroupListR[] = $st["required"];
|
||||
}
|
||||
}
|
||||
$status = $version->getApprovalStatus();
|
||||
foreach ($status as $st) {
|
||||
if ($st["status"]==0 && !in_array($st["required"], $emailUserList)) {
|
||||
if($st['type'] == 0)
|
||||
$emailUserList[] = $st["required"];
|
||||
$emailUserListA[] = $st["required"];
|
||||
else
|
||||
$emailGroupList[] = $st["required"];
|
||||
$emailGroupListA[] = $st["required"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,15 +154,25 @@ else {
|
|||
// Notify affected users.
|
||||
if ($notifier){
|
||||
$nl=$document->getNotifyList();
|
||||
$userrecipients = array();
|
||||
foreach ($emailUserList as $eID) {
|
||||
$userrecipientsR = array();
|
||||
foreach ($emailUserListR as $eID) {
|
||||
$eU = $version->getDMS()->getUser($eID);
|
||||
$userrecipients[] = $eU;
|
||||
$userrecipientsR[] = $eU;
|
||||
}
|
||||
$grouprecipients = array();
|
||||
foreach ($emailGroupList as $eID) {
|
||||
$grouprecipientsR = array();
|
||||
foreach ($emailGroupListR as $eID) {
|
||||
$eU = $version->getDMS()->getGroup($eID);
|
||||
$grouprecipients[] = $eU;
|
||||
$grouprecipientsR[] = $eU;
|
||||
}
|
||||
$userrecipientsA = array();
|
||||
foreach ($emailUserListA as $eID) {
|
||||
$eU = $version->getDMS()->getUser($eID);
|
||||
$userrecipientsA[] = $eU;
|
||||
}
|
||||
$grouprecipientsA = array();
|
||||
foreach ($emailGroupListA as $eID) {
|
||||
$eU = $version->getDMS()->getGroup($eID);
|
||||
$grouprecipientsA[] = $eU;
|
||||
}
|
||||
|
||||
$subject = "version_deleted_email_subject";
|
||||
|
@ -173,13 +185,18 @@ else {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$notifier->toList($user, $userrecipients, $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
foreach($grouprecipients as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $oldowner, $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
$notifier->toList($user, $userrecipientsR, $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
$notifier->toList($user, $userrecipientsA, $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach($grouprecipientsR as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
foreach($grouprecipientsA as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,9 +86,9 @@ if($version->removeWorkflow($user)) {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
// Send notification to subscribers.
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,9 +100,9 @@ if($version->returnFromSubWorkflow($user, $transition, $_POST["comment"])) {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
// Send notification to subscribers.
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,11 +114,11 @@ if ($_POST["reviewType"] == "ind") {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -149,11 +149,11 @@ else if ($_POST["reviewType"] == "grp") {
|
|||
$params['username'] = $user->getFullName();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -179,11 +179,11 @@ if ($_POST["reviewStatus"]==-1){
|
|||
$params['username'] = $user->getFullName();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,9 +243,9 @@ if ($_POST["reviewStatus"]==-1){
|
|||
$params['username'] = $user->getFullName();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -272,11 +272,11 @@ if ($_POST["reviewStatus"]==-1){
|
|||
if ($dastat["type"] == 0) {
|
||||
|
||||
$approver = $dms->getUser($dastat["required"]);
|
||||
$notifier->toIndividual($document->getOwner(), $approver, $subject, $message, $params);
|
||||
$notifier->toIndividual($document->getOwner(), $approver, $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
} elseif ($dastat["type"] == 1) {
|
||||
|
||||
$group = $dms->getGroup($dastat["required"]);
|
||||
$notifier->toGroup($document->getOwner(), $group, $subject, $message, $params);
|
||||
$notifier->toGroup($document->getOwner(), $group, $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,9 +85,9 @@ if($version->rewindWorkflow()) {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
// Send notification to subscribers.
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,9 +94,9 @@ if($version->runSubWorkflow($subworkflow)) {
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
// Send notification to subscribers.
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ foreach ($pIndRev as $p) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toIndividual($user, $docAccess["users"][$accessIndex["i"][$p]], $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $docAccess["users"][$accessIndex["i"][$p]], $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -210,7 +210,7 @@ if (count($reviewIndex["i"]) > 0) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toIndividual($user, $docAccess["users"][$accessIndex["i"][$rx]], $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $docAccess["users"][$accessIndex["i"][$rx]], $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -256,7 +256,7 @@ foreach ($pGrpRev as $p) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toGroup($user, $docAccess["groups"][$accessIndex["g"][$p]], $subject, $message, $params);
|
||||
$notifier->toGroup($user, $docAccess["groups"][$accessIndex["g"][$p]], $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -314,7 +314,7 @@ if (count($reviewIndex["g"]) > 0) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toGroup($user, $docAccess["groups"][$accessIndex["g"][$rx]], $subject, $message, $params);
|
||||
$notifier->toGroup($user, $docAccess["groups"][$accessIndex["g"][$rx]], $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -376,7 +376,7 @@ foreach ($pIndApp as $p) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toIndividual($user, $docAccess["users"][$accessIndex["i"][$p]], $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $docAccess["users"][$accessIndex["i"][$p]], $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -434,7 +434,7 @@ if (count($approvalIndex["i"]) > 0) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toIndividual($user, $docAccess["users"][$accessIndex["i"][$rx]], $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $docAccess["users"][$accessIndex["i"][$rx]], $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -480,7 +480,7 @@ foreach ($pGrpApp as $p) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toGroup($user, $docAccess["groups"][$accessIndex["g"][$p]], $subject, $message, $params);
|
||||
$notifier->toGroup($user, $docAccess["groups"][$accessIndex["g"][$p]], $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -538,7 +538,7 @@ if (count($approvalIndex["g"]) > 0) {
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
$notifier->toGroup($user, $docAccess["groups"][$accessIndex["g"][$rx]], $subject, $message, $params);
|
||||
$notifier->toGroup($user, $docAccess["groups"][$accessIndex["g"][$rx]], $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -91,10 +91,10 @@ if ($notifier) {
|
|||
|
||||
foreach($workflow->getNextTransitions($workflow->getInitState()) as $ntransition) {
|
||||
foreach($ntransition->getUsers() as $tuser) {
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
foreach($ntransition->getGroups() as $tuser) {
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,9 +81,9 @@ if ($notifier){
|
|||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -97,9 +97,9 @@ if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
|
||||
// Send notification to subscribers.
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
|
||||
if($settings->_enableNotificationWorkflow) {
|
||||
|
@ -122,13 +122,13 @@ if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) {
|
|||
foreach($ntransition->getUsers() as $tuser) {
|
||||
if(!in_array($tuser->getUser()->getID(), $usersinformed)) {
|
||||
$usersinformed[] = $tuser->getUser()->getID();
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WO▨KFLOW);
|
||||
}
|
||||
}
|
||||
foreach($ntransition->getGroups() as $tuser) {
|
||||
if(!in_array($tuser->getGroup()->getID(), $groupsinformed)) {
|
||||
$groupsinformed[] = $tuser->getGroup()->getID();
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -322,13 +322,13 @@ default:
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
// if user is not owner send notification to owner
|
||||
// if ($user->getID() != $document->getOwner()->getID())
|
||||
// $notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params);
|
||||
// $notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
|
||||
if($workflow && $settings->_enableNotificationWorkflow) {
|
||||
$subject = "request_workflow_action_email_subject";
|
||||
|
@ -346,10 +346,10 @@ default:
|
|||
|
||||
foreach($workflow->getNextTransitions($workflow->getInitState()) as $ntransition) {
|
||||
foreach($ntransition->getUsers() as $tuser) {
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
foreach($ntransition->getGroups() as $tuser) {
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -370,10 +370,10 @@ default:
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
foreach($reviewers['i'] as $reviewerid) {
|
||||
$notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
foreach($reviewers['g'] as $reviewergrpid) {
|
||||
$notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -391,10 +391,10 @@ default:
|
|||
$params['http_root'] = $settings->_httpRoot;
|
||||
|
||||
foreach($approvers['i'] as $approverid) {
|
||||
$notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
foreach($approvers['g'] as $approvergrpid) {
|
||||
$notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params);
|
||||
$notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -410,9 +410,9 @@ default:
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||
$notifier->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
foreach ($notifyList["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -296,7 +296,7 @@ else if ($action == "sendlogindata" && $settings->_enableEmail) {
|
|||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php";
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
$params['http_root'] = $settings->_httpRoot;
|
||||
$notifier->toIndividual($user, $newuser, $subject, $message, $params);
|
||||
$notifier->toIndividual($user, $newuser, $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);
|
||||
}
|
||||
add_log_line(".php&action=sendlogindata&userid=".$userid);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user