diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-12 11:00:30 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-13 15:16:59 +0100 |
commit | 9d32475260b71b97c3fc7f8bf63e1c51e55f210e (patch) | |
tree | 9154d279a3c8b83c3981855827444676c5ef3cca /lib/public/share.php | |
parent | 1295e541736f3bf073013db72a49416821f5d4bc (diff) | |
download | nextcloud-server-9d32475260b71b97c3fc7f8bf63e1c51e55f210e.tar.gz nextcloud-server-9d32475260b71b97c3fc7f8bf63e1c51e55f210e.zip |
finally fix the paths for the OCS Share API
Diffstat (limited to 'lib/public/share.php')
-rw-r--r-- | lib/public/share.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index dd9e1bbf9a9..5066d40354d 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -1250,10 +1250,12 @@ class Share { // Remove root from file source paths if retrieving own shared items if (isset($uidOwner) && isset($row['path'])) { if (isset($row['parent'])) { + // FIXME: Doesn't always construct the correct path, example: + // Folder '/a/b', share '/a' and '/a/b' to user2 + // user2 reshares /Shared/b and ask for share status of /Shared/a/b + // expected result: path=/Shared/a/b; actual result /Shared/b because of the parent $query = \OC_DB::prepare('SELECT `file_target` FROM `*PREFIX*share` WHERE `id` = ?'); $parentResult = $query->execute(array($row['parent'])); - //$query = \OC_DB::prepare('SELECT `file_target` FROM `*PREFIX*share` WHERE `id` = ?'); - //$parentResult = $query->execute(array($row['id'])); if (\OC_DB::isError($result)) { \OC_Log::write('OCP\Share', 'Can\'t select parent: ' . \OC_DB::getErrorMessage($result) . ', select=' . $select . ' where=' . $where, |