diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-01-30 15:32:19 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-01-30 16:08:46 +0100 |
commit | 7e3e3bed5048940033494d6179527b8b3112e15f (patch) | |
tree | 54a356ae1b07c177e5143bf8e2bea4e39d499472 /lib/private/Share20 | |
parent | 8ed004d6ae7429c03431361c8b1bf386ed18c712 (diff) | |
download | nextcloud-server-7e3e3bed5048940033494d6179527b8b3112e15f.tar.gz nextcloud-server-7e3e3bed5048940033494d6179527b8b3112e15f.zip |
Fix typos and unused return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r-- | lib/private/Share20/Manager.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 64fdff5277f..b04f1acbd87 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -692,15 +692,15 @@ class Manager implements IManager { $emailAddress, $share->getExpirationDate() ); - $this->logger->debug('Send share notification to ' . $emailAddress . ' for share with ID ' . $share->getId(), ['app' => 'share']); + $this->logger->debug('Sent share notification to ' . $emailAddress . ' for share with ID ' . $share->getId(), ['app' => 'share']); } else { - $this->logger->debug('Share notification not send to ' . $share->getSharedWith() . ' because email address is not set.', ['app' => 'share']); + $this->logger->debug('Share notification not sent to ' . $share->getSharedWith() . ' because email address is not set.', ['app' => 'share']); } } else { - $this->logger->debug('Share notification not send to ' . $share->getSharedWith() . ' because user could not be found.', ['app' => 'share']); + $this->logger->debug('Share notification not sent to ' . $share->getSharedWith() . ' because user could not be found.', ['app' => 'share']); } } else { - $this->logger->debug('Share notification not send because mailsend is false.', ['app' => 'share']); + $this->logger->debug('Share notification not sent because mailsend is false.', ['app' => 'share']); } } @@ -708,13 +708,16 @@ class Manager implements IManager { } /** + * Send mail notifications + * + * This method will catch and log mail transmission errors + * * @param IL10N $l Language of the recipient * @param string $filename file/folder name * @param string $link link to the file/folder * @param string $initiator user ID of share sender * @param string $shareWith email address of share receiver * @param \DateTime|null $expiration - * @return bool */ protected function sendMailNotification(IL10N $l, $filename, @@ -777,14 +780,11 @@ class Manager implements IManager { $failedRecipients = $this->mailer->send($message); if(!empty($failedRecipients)) { $this->logger->error('Share notification mail could not be sent to: ' . implode(', ', $failedRecipients)); - return false; + return; } } catch (\Exception $e) { $this->logger->logException($e, ['message' => 'Share notification mail could not be sent']); - return false; } - - return true; } /** |