summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/lib/storage.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php
index 0b121c344f9..d5e21959698 100644
--- a/apps/files_versions/lib/storage.php
+++ b/apps/files_versions/lib/storage.php
@@ -169,11 +169,8 @@ class Storage {
// Keep the "encrypted" value of the original file
$oldVersion = $files_view->getFileInfo($filename)->getEncryptedVersion();
- $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
- $qb->update('filecache')
- ->set('encrypted', $qb->createNamedParameter($oldVersion))
- ->where($qb->expr()->eq('fileid', $qb->createNamedParameter($newFileInfo->getId())))
- ->execute();
+ $cache = $newFileInfo->getStorage()->getCache();
+ $cache->update($newFileInfo->getId(), ['encrypted' => $oldVersion, 'encryptedVersion' => $oldVersion]);
}
}