Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-03-12 14:00:30 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2014-03-13 18:16:59 +0400
commit9d32475260b71b97c3fc7f8bf63e1c51e55f210e (patch)
tree9154d279a3c8b83c3981855827444676c5ef3cca /lib
parent1295e541736f3bf073013db72a49416821f5d4bc (diff)
finally fix the paths for the OCS Share API
Diffstat (limited to 'lib')
-rw-r--r--lib/public/share.php6
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,