aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/cache
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-02-08 20:35:33 +0100
committerLukas Reschke <lukas@owncloud.com>2016-02-09 23:43:27 +0100
commit5ccb9dfa7e35d78d61d7a973ee2a5fddfda7d766 (patch)
treec0d45ac7af479ba32dc2fdbd492999489fa62a94 /lib/private/files/cache
parent3badf5caf579f8ff10c9917f62cb41cd9b0c68f8 (diff)
downloadnextcloud-server-5ccb9dfa7e35d78d61d7a973ee2a5fddfda7d766.tar.gz
nextcloud-server-5ccb9dfa7e35d78d61d7a973ee2a5fddfda7d766.zip
Use database for keeping track of the version
Diffstat (limited to 'lib/private/files/cache')
-rw-r--r--lib/private/files/cache/cache.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index 22b9f49e528..b30666d48d2 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -145,6 +145,7 @@ class Cache implements ICache {
$data['size'] = 0 + $data['size'];
$data['mtime'] = (int)$data['mtime'];
$data['storage_mtime'] = (int)$data['storage_mtime'];
+ $data['encryptedVersion'] = (int)$data['encrypted'];
$data['encrypted'] = (bool)$data['encrypted'];
$data['storage'] = $this->storageId;
$data['mimetype'] = $this->mimetypeLoader->getMimetypeById($data['mimetype']);
@@ -345,8 +346,12 @@ class Cache implements ICache {
$queryParts[] = '`mtime`';
}
} elseif ($name === 'encrypted') {
- // Boolean to integer conversion
- $value = $value ? 1 : 0;
+ if(isset($data['encryptedVersion'])) {
+ $value = $data['encryptedVersion'];
+ } else {
+ // Boolean to integer conversion
+ $value = $value ? 1 : 0;
+ }
}
$params[] = $value;
$queryParts[] = '`' . $name . '`';