aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/cache.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-04-11 11:18:50 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-04-23 12:54:25 +0200
commitd4085d81485c3d973faf4211e11af1c1853e619c (patch)
tree903f6bf0a95f384f5c7ba4bdc5a603c42a4a7bb7 /apps/files_sharing/lib/cache.php
parent33cdd938904d92607db56c1f3993b74b14ce9bf3 (diff)
downloadnextcloud-server-d4085d81485c3d973faf4211e11af1c1853e619c.tar.gz
nextcloud-server-d4085d81485c3d973faf4211e11af1c1853e619c.zip
make sure that path is not 'false'
Diffstat (limited to 'apps/files_sharing/lib/cache.php')
-rw-r--r--apps/files_sharing/lib/cache.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index e91c15cc62a..11f180bf7e6 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -169,9 +169,8 @@ class Shared_Cache extends Cache {
* @return int file id
*/
public function put($file, array $data) {
- if ($file === '' && isset($data['etag'])) {
- return \OCP\Config::setUserValue(\OCP\User::getUser(), 'files_sharing', 'etag', $data['etag']);
- } else if ($cache = $this->getSourceCache($file)) {
+ $file = ($file === false) ? '' : $file;
+ if ($cache = $this->getSourceCache($file)) {
return $cache->put($this->files[$file], $data);
}
return false;
@@ -368,6 +367,7 @@ class Shared_Cache extends Cache {
* @return int
*/
public function calculateFolderSize($path, $entry = null) {
+ $path = ($path === false) ? '' : $path;
if ($cache = $this->getSourceCache($path)) {
return $cache->calculateFolderSize($this->files[$path]);
}