Skip to content

Commit 13eb255

Browse files
ChristophWurstBackportbot
authored andcommitted
Fix typos and unused return values
Signed-off-by: Christoph Wurst <[email protected]>
1 parent 1c88b90 commit 13eb255

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/private/Share20/Manager.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -692,29 +692,32 @@ public function createShare(\OCP\Share\IShare $share) {
692692
$emailAddress,
693693
$share->getExpirationDate()
694694
);
695-
$this->logger->debug('Send share notification to ' . $emailAddress . ' for share with ID ' . $share->getId(), ['app' => 'share']);
695+
$this->logger->debug('Sent share notification to ' . $emailAddress . ' for share with ID ' . $share->getId(), ['app' => 'share']);
696696
} else {
697-
$this->logger->debug('Share notification not send to ' . $share->getSharedWith() . ' because email address is not set.', ['app' => 'share']);
697+
$this->logger->debug('Share notification not sent to ' . $share->getSharedWith() . ' because email address is not set.', ['app' => 'share']);
698698
}
699699
} else {
700-
$this->logger->debug('Share notification not send to ' . $share->getSharedWith() . ' because user could not be found.', ['app' => 'share']);
700+
$this->logger->debug('Share notification not sent to ' . $share->getSharedWith() . ' because user could not be found.', ['app' => 'share']);
701701
}
702702
} else {
703-
$this->logger->debug('Share notification not send because mailsend is false.', ['app' => 'share']);
703+
$this->logger->debug('Share notification not sent because mailsend is false.', ['app' => 'share']);
704704
}
705705
}
706706

707707
return $share;
708708
}
709709

710710
/**
711+
* Send mail notifications
712+
*
713+
* This method will catch and log mail transmission errors
714+
*
711715
* @param IL10N $l Language of the recipient
712716
* @param string $filename file/folder name
713717
* @param string $link link to the file/folder
714718
* @param string $initiator user ID of share sender
715719
* @param string $shareWith email address of share receiver
716720
* @param \DateTime|null $expiration
717-
* @return bool
718721
*/
719722
protected function sendMailNotification(IL10N $l,
720723
$filename,
@@ -777,14 +780,11 @@ protected function sendMailNotification(IL10N $l,
777780
$failedRecipients = $this->mailer->send($message);
778781
if(!empty($failedRecipients)) {
779782
$this->logger->error('Share notification mail could not be sent to: ' . implode(', ', $failedRecipients));
780-
return false;
783+
return;
781784
}
782785
} catch (\Exception $e) {
783786
$this->logger->logException($e, ['message' => 'Share notification mail could not be sent']);
784-
return false;
785787
}
786-
787-
return true;
788788
}
789789

790790
/**

0 commit comments

Comments
 (0)