diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-12 11:00:30 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-25 17:52:45 +0100 |
commit | 31681a3a27d1f36a980a044479a5948b4310ebe5 (patch) | |
tree | 2ca8d32d001f4941dbdefbe842ae417c7911d390 /lib | |
parent | 3653a51af2f21065f7afad40624e053f0dfaadb3 (diff) | |
download | nextcloud-server-31681a3a27d1f36a980a044479a5948b4310ebe5.tar.gz nextcloud-server-31681a3a27d1f36a980a044479a5948b4310ebe5.zip |
finally fix the paths for the OCS Share API
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share/share.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index e4886abd2b5..a385328edc1 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -1085,10 +1085,12 @@ class Share extends \OC\Share\Constants { // 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, |