add path relative to the files folder of the currently logged in user to the output of getFolderContent()
This commit is contained in:
parent
cf6e79cda8
commit
eaed786eed
|
@ -127,7 +127,18 @@ class Shared_Cache extends Cache {
|
||||||
return $files;
|
return $files;
|
||||||
} else {
|
} else {
|
||||||
if ($cache = $this->getSourceCache($folder)) {
|
if ($cache = $this->getSourceCache($folder)) {
|
||||||
return $cache->getFolderContents($this->files[$folder]);
|
$sourceFolderContent = $cache->getFolderContents($this->files[$folder]);
|
||||||
|
foreach ($sourceFolderContent as $key => $c) {
|
||||||
|
$ownerPathParts = explode('/', \OC_Filesystem::normalizePath($c['path']));
|
||||||
|
$userPathParts = explode('/', \OC_Filesystem::normalizePath($folder));
|
||||||
|
$usersPath = 'files/Shared/'.$userPathParts[1];
|
||||||
|
foreach (array_slice($ownerPathParts, 3) as $part) {
|
||||||
|
$usersPath .= '/'.$part;
|
||||||
|
}
|
||||||
|
$sourceFolderContent[$key]['usersPath'] = $usersPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sourceFolderContent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue