]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge branch 'master' into display-share-owner-master
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 28 Feb 2014 13:54:10 +0000 (14:54 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 28 Feb 2014 13:54:10 +0000 (14:54 +0100)
Conflicts:
apps/files_sharing/lib/cache.php

1  2 
apps/files_sharing/lib/cache.php

index 27602f69abf1c51610cef56a6a86ad1bdac3b557,4b0da0b002d266398761c0a28999e45638a89293..10f2182655fbf7aa40512f0ab456282a24df1bd6
@@@ -134,19 -135,11 +135,14 @@@ class Shared_Cache extends Cache 
                        }
                        return $files;
                } else {
-                       if ($cache = $this->getSourceCache($folder)) {
+                       $cache = $this->getSourceCache($folder);
+                       if ($cache) {
 +                              $parent = $this->storage->getFile($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;
+                                       $sourceFolderContent[$key]['usersPath'] = 'files/Shared/' . $folder . '/' . $c['name'];
 +                                      $sourceFolderContent[$key]['uid_owner'] = $parent['uid_owner'];
 +                                      $sourceFolderContent[$key]['displayname_owner'] = $parent['uid_owner'];
                                }
  
                                return $sourceFolderContent;