From b01e2aa66645454da3a3d7b734e2f7fac32c1ed3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 30 Nov 2021 17:17:28 +0100 Subject: [PATCH] take out sending mails to owner --- op/op.ReceiptDocument.php | 6 +++++- op/op.ReviseDocument.php | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/op/op.ReceiptDocument.php b/op/op.ReceiptDocument.php index 04dd0f7b4..5bdfb8a5c 100644 --- a/op/op.ReceiptDocument.php +++ b/op/op.ReceiptDocument.php @@ -113,7 +113,11 @@ if ($_POST["receiptType"] == "ind" || $_POST["receiptType"] == "grp") { foreach ($nl["groups"] as $grp) { $notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); } - $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); + /* Send mail to owner only if the currently logged in user is not the + * owner and the owner is not already in the list of notifiers. + */ +// if($user->getID() != $document->getOwner()->getID() && false === SeedDMS_Core_DMS::inList($document->getOwner(), $nl['users'])) +// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); } } diff --git a/op/op.ReviseDocument.php b/op/op.ReviseDocument.php index b303124fd..1a4254be5 100644 --- a/op/op.ReviseDocument.php +++ b/op/op.ReviseDocument.php @@ -116,7 +116,11 @@ if ($_POST["revisionType"] == "ind" || $_POST["revisionType"] == "grp") { foreach ($nl["groups"] as $grp) { $notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); } - $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); + /* Send mail to owner only if the currently logged in user is not the + * owner and the owner is not already in the list of notifiers. + */ +// if($user->getID() != $document->getOwner()->getID() && false === SeedDMS_Core_DMS::inList($document->getOwner(), $nl['users'])) +// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); } } @@ -142,7 +146,11 @@ if($olddocstatus['status'] != $newdocstatus['status']) { foreach ($nl["groups"] as $grp) { $notifier->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); } - $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); + /* Send mail to owner only if the currently logged in user is not the + * owner and the owner is not already in the list of notifiers. + */ +// if($user->getID() != $document->getOwner()->getID() && false === SeedDMS_Core_DMS::inList($document->getOwner(), $nl['users'])) +// $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); } }