Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2021-02-02 10:21:35 +01:00
commit 93f0faa145

View File

@ -68,6 +68,7 @@ if (isset($_COOKIE["mydms_session"])) {
$role = $user->getRole(); $role = $user->getRole();
$dms->noReadForStatus = $role->getNoAccess(); $dms->noReadForStatus = $role->getNoAccess();
global $logger;
$notifier = new SeedDMS_NotificationService($logger); $notifier = new SeedDMS_NotificationService($logger);
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) { if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) { foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
@ -847,6 +848,7 @@ switch($command) {
$notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); $notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
} }
$workflow = $controller->getParam('workflow');
if($workflow && $settings->_enableNotificationWorkflow) { if($workflow && $settings->_enableNotificationWorkflow) {
$subject = "request_workflow_action_email_subject"; $subject = "request_workflow_action_email_subject";
$message = "request_workflow_action_email_body"; $message = "request_workflow_action_email_body";
@ -873,6 +875,11 @@ switch($command) {
if($settings->_enableNotificationAppRev) { if($settings->_enableNotificationAppRev) {
/* Reviewers and approvers will be informed about the new document */ /* Reviewers and approvers will be informed about the new document */
/* Get reviewers and approvers from controller in case it was
* modified in a hook
*/
$reviewers = $controller->getParam('reviewers');
$approvers = $controller->getParam('approvers');
if($reviewers['i'] || $reviewers['g']) { if($reviewers['i'] || $reviewers['g']) {
$subject = "review_request_email_subject"; $subject = "review_request_email_subject";
$message = "review_request_email_body"; $message = "review_request_email_body";