summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-04-25 14:04:22 +0200
committerRobin Appelman <icewind@owncloud.com>2014-04-25 14:04:22 +0200
commitb42418246f3c0d623fc9cd028e905ac3b1303a9f (patch)
tree19f2713d31969ca0961c7b926bd8c52777c287fb /apps
parent672a8248ce185cb38a6b8ae9617eb0e6bb186f8b (diff)
downloadnextcloud-server-b42418246f3c0d623fc9cd028e905ac3b1303a9f.tar.gz
nextcloud-server-b42418246f3c0d623fc9cd028e905ac3b1303a9f.zip
Also fixed the returned internal path when getting the root shared item by id
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/cache.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index fa86d55730d..8c680e9c977 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -88,7 +88,7 @@ class Shared_Cache extends Cache {
if ($cache = $this->getSourceCache($file)) {
$data = $cache->get($this->files[$file]);
$data['displayname_owner'] = \OC_User::getDisplayName($this->storage->getSharedFrom());
- $data['path'] = '';
+ $data['path'] = $file;
if ($file === '') {
$data['is_share_mount_point'] = true;
}
@@ -100,7 +100,6 @@ class Shared_Cache extends Cache {
// cache information for the source item
if (!is_int($file) || $file === 0) {
$file = $this->storage->getSourceId();
- $mountPoint = $this->storage->getMountPoint();
}
$query = \OC_DB::prepare(
'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`,'
@@ -123,8 +122,8 @@ class Shared_Cache extends Cache {
} else {
$data['size'] = (int)$data['size'];
}
- if (isset($mountPoint)) {
- $data['path'] = 'files/' . $mountPoint;
+ if (!is_int($file) || $file === 0) {
+ $data['path'] = '';
$data['is_share_mount_point'] = true;
}
return $data;