diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-16 09:27:02 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-16 20:43:17 +0200 |
commit | 9e86d71cc533e84084a4dd5e440af0f5aa516108 (patch) | |
tree | 5f770ba8f7a36d098b60d6ca4a3f7997eefb5e7c /lib/private/share | |
parent | 9e6a4dce43e298cbbfde963242d4f6780784a2ae (diff) | |
download | nextcloud-server-9e86d71cc533e84084a4dd5e440af0f5aa516108.tar.gz nextcloud-server-9e86d71cc533e84084a4dd5e440af0f5aa516108.zip |
When sharing with the owner show the path
The error message should contain the path that is being shared not the
numeric id.
Diffstat (limited to 'lib/private/share')
-rw-r--r-- | lib/private/share/share.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index abb9ec3cb99..211fbf4ee01 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -619,10 +619,13 @@ class Share extends Constants { if (is_null($itemSourceName)) { $itemSourceName = $itemSource; } + $itemName = $itemSourceName; // check if file can be shared if ($itemType === 'file' or $itemType === 'folder') { $path = \OC\Files\Filesystem::getPath($itemSource); + $itemName = $path; + // verify that the file exists before we try to share it if (!$path) { $message = 'Sharing %s failed, because the file does not exist'; @@ -678,7 +681,7 @@ class Share extends Constants { 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($itemSourceName, $shareWith)); + $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); throw new \Exception($message_t); } |