send status changes to uploader of document

This commit is contained in:
Uwe Steinmann 2024-03-20 16:19:53 +01:00
parent 825186a046
commit 20e61d1691

View File

@ -576,7 +576,7 @@ class SeedDMS_NotificationService {
} /* }}} */ } /* }}} */
/** /**
* This notification is sent when a new attachment is created. * This notification is sent when an attachment is deleted.
*/ */
public function sendDeleteFileMail($file, $user) { /* {{{ */ public function sendDeleteFileMail($file, $user) { /* {{{ */
$document = $file->getDocument(); $document = $file->getDocument();
@ -814,10 +814,10 @@ class SeedDMS_NotificationService {
$params['sitename'] = $this->settings->_siteName; $params['sitename'] = $this->settings->_siteName;
$params['http_root'] = $this->settings->_httpRoot; $params['http_root'] = $this->settings->_httpRoot;
// if user is not owner send notification to owner // if user is not uploader of the version send notification to uploader
if ($user->getID() != $document->getOwner()->getID() && if ($user->getID() != $content->getUser()->getID() &&
false === SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) { false === SeedDMS_Core_DMS::inList($content->getUser(), $notifyList['users'])) {
$this->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); $this->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_UPLOADER);
} }
$this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
foreach ($notifyList["groups"] as $grp) { foreach ($notifyList["groups"] as $grp) {