diff --git a/inc/inc.ClassNotificationService.php b/inc/inc.ClassNotificationService.php index e952a1ed1..e38a4a9c4 100644 --- a/inc/inc.ClassNotificationService.php +++ b/inc/inc.ClassNotificationService.php @@ -433,8 +433,11 @@ class SeedDMS_NotificationService { false === SeedDMS_Core_DMS::inList($document->getOwner(), $nl['users'])) $this->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); - /* Send mail to uploader of version */ - if($user->getID() != $version->getUser()->getID() && false === SeedDMS_Core_DMS::inList($version->getUser(), $nl['users'])) + /* Send mail to uploader of version only if the uploader is not the owner and + * the currently logged in user is not the + * owner and the owner is not already in the list of notifiers. + */ + if($user->getID() != $version->getUser()->getID() && $version->getUser()->getID() != $document->getOwner() && false === SeedDMS_Core_DMS::inList($version->getUser(), $nl['users'])) $this->toIndividual($user, $version->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_UPLOADER); } /* }}} */ @@ -564,8 +567,11 @@ class SeedDMS_NotificationService { false === SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) $this->toIndividual($user, $document->getOwner(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); - /* Send mail to uploader of version */ - if($user->getID() != $content->getUser()->getID() && false === SeedDMS_Core_DMS::inList($content->getUser(), $nl['users'])) + /* Send mail to uploader of version only if the uploader is not the owner and + * the currently logged in user is not the + * owner and the owner is not already in the list of notifiers. + */ + if($user->getID() != $content->getUser()->getID() && $content->getUser()->getID() != $document->getOwner() && false === SeedDMS_Core_DMS::inList($content->getUser(), $nl['users'])) $this->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_UPLOADER); } /* }}} */