no exception for the root of the mount point (formerly Shared/), just get the file cache information from the cache

This commit is contained in:
Bjoern Schiessle 2014-04-04 17:45:53 +02:00
parent c377893f0e
commit b02b6d3c23
2 changed files with 1 additions and 26 deletions

View file

@ -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]);
}

View file

@ -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) {