diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-16 10:00:33 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-16 20:43:17 +0200 |
commit | 8fdb12f8fb7e652196edb7a79aee9ee8a7614f89 (patch) | |
tree | 031de4f0c23b93906aff9ded0954de4cd7e59869 /lib/private/share/share.php | |
parent | 9e86d71cc533e84084a4dd5e440af0f5aa516108 (diff) | |
download | nextcloud-server-8fdb12f8fb7e652196edb7a79aee9ee8a7614f89.tar.gz nextcloud-server-8fdb12f8fb7e652196edb7a79aee9ee8a7614f89.zip |
Check for error when resharing
Diffstat (limited to 'lib/private/share/share.php')
-rw-r--r-- | lib/private/share/share.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 211fbf4ee01..f2ba33bd16b 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -680,9 +680,9 @@ class Share extends Constants { // Verify share type and sharing conditions are met if ($shareType === self::SHARE_TYPE_USER) { if ($shareWith == $uidOwner) { - $message = 'Sharing %s failed, because the user %s is the item owner'; - $message_t = $l->t('Sharing %s failed, because the user %s is the item owner', array($itemName, $shareWith)); - \OCP\Util::writeLog('OCP\Share', sprintf($message, $itemSourceName, $shareWith), \OCP\Util::DEBUG); + $message = 'Sharing %s failed, because you can not share with yourself'; + $message_t = $l->t('Sharing %s failed, because you can not share with yourself', [$itemName]); + \OCP\Util::writeLog('OCP\Share', sprintf($message, $itemSourceName), \OCP\Util::DEBUG); throw new \Exception($message_t); } if (!\OC_User::userExists($shareWith)) { @@ -2212,7 +2212,7 @@ class Share extends Constants { // Check if attempting to share back to owner if ($checkReshare['uid_owner'] == $shareWith && $shareType == self::SHARE_TYPE_USER) { $message = 'Sharing %s failed, because the user %s is the original sharer'; - $message_t = $l->t('Sharing %s failed, because the user %s is the original sharer', array($itemSourceName, $shareWith)); + $message_t = $l->t('Sharing failed, because the user %s is the original sharer', [$shareWith]); \OCP\Util::writeLog('OCP\Share', sprintf($message, $itemSourceName, $shareWith), \OCP\Util::DEBUG); throw new \Exception($message_t); |