diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-04-04 17:45:53 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-04-23 12:54:24 +0200 |
commit | b02b6d3c236bb015e41447c686acf7167ad037e9 (patch) | |
tree | a68b03052cb286c5bee1c83c990894cbc9e01046 /apps | |
parent | c377893f0e81dbefe8612fecd90434e47573be29 (diff) | |
download | nextcloud-server-b02b6d3c236bb015e41447c686acf7167ad037e9.tar.gz nextcloud-server-b02b6d3c236bb015e41447c686acf7167ad037e9.zip |
no exception for the root of the mount point (formerly Shared/), just get the file cache information from the cache
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/cache.php | 11 | ||||
-rw-r--r-- | apps/files_sharing/lib/share/file.php | 16 |
2 files changed, 1 insertions, 26 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index c509ec24576..becd436f798 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -84,16 +84,7 @@ class Shared_Cache extends Cache { * @return array */ public function get($file) { - if ($file == '') { - $data = \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_FILE_APP_ROOT); - $etag = \OCP\Config::getUserValue(\OCP\User::getUser(), 'files_sharing', 'etag'); - if (!isset($etag)) { - $etag = $this->storage->getETag(''); - \OCP\Config::setUserValue(\OCP\User::getUser(), 'files_sharing', 'etag', $etag); - } - $data['etag'] = $etag; - return $data; - } else if (is_string($file)) { + if (is_string($file)) { if ($cache = $this->getSourceCache($file)) { return $cache->get($this->files[$file]); } diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index b5196ab6fac..f9f3211bd82 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -109,22 +109,6 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { $files[] = $file; } return $files; - } else if ($format == self::FORMAT_FILE_APP_ROOT) { - $mtime = 0; - $size = 0; - foreach ($items as $item) { - if ($item['mtime'] > $mtime) { - $mtime = $item['mtime']; - } - $size += (int)$item['size']; - } - return array( - 'fileid' => -1, - 'name' => 'Shared', - 'mtime' => $mtime, - 'mimetype' => 'httpd/unix-directory', - 'size' => $size - ); } else if ($format == self::FORMAT_OPENDIR) { $files = array(); foreach ($items as $item) { |