diff options
Diffstat (limited to 'lib/private/share')
-rw-r--r-- | lib/private/share/mailnotifications.php | 4 | ||||
-rw-r--r-- | lib/private/share/share.php | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php index f45d80b37ca..4d282158ba4 100644 --- a/lib/private/share/mailnotifications.php +++ b/lib/private/share/mailnotifications.php @@ -176,10 +176,12 @@ class MailNotifications { $subject = (string)$this->l->t('%s shared »%s« with you', [$this->senderDisplayName, $filename]); list($htmlBody, $textBody) = $this->createMailBody($filename, $link, $expiration); + $recipient = str_replace([', ', '; ', ',', ';', ' '], ',', $recipient); + $recipients = explode(',', $recipient); try { $message = $this->mailer->createMessage(); $message->setSubject($subject); - $message->setTo([$recipient]); + $message->setTo($recipients); $message->setHtmlBody($htmlBody); $message->setPlainBody($textBody); $message->setFrom([ diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 70f9a6e8920..8899df25636 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -745,10 +745,8 @@ class Share extends Constants { // The check for each user in the group is done inside the put() function if ($checkExists = self::getItems($itemType, $itemSource, self::SHARE_TYPE_GROUP, $shareWith, null, self::FORMAT_NONE, null, 1, true, true)) { - // Only allow the same share to occur again if it is the same - // owner and is not a group share, this use case is for increasing - // permissions for a specific user - if ($checkExists['uid_owner'] != $uidOwner || $checkExists['share_type'] == $shareType) { + + if ($checkExists['share_with'] === $shareWith && $checkExists['share_type'] === \OCP\Share::SHARE_TYPE_GROUP) { $message = 'Sharing %s failed, because this item is already shared with %s'; $message_t = $l->t('Sharing %s failed, because this item is already shared with %s', array($itemSourceName, $shareWith)); \OCP\Util::writeLog('OCP\Share', sprintf($message, $itemSourceName, $shareWith), \OCP\Util::DEBUG); |