diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-02-10 12:30:39 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-02-10 12:30:39 +0100 |
commit | 762636efcd9519eada0e39de5ab5fb048c9881ef (patch) | |
tree | 75f429bd9ea70fb41cacf314051598d496f809df /apps/files_versions/lib | |
parent | 9a2c517ca8eaf25bf142696e1479355112b1f108 (diff) | |
download | nextcloud-server-762636efcd9519eada0e39de5ab5fb048c9881ef.tar.gz nextcloud-server-762636efcd9519eada0e39de5ab5fb048c9881ef.zip |
Use cache directly instead of QB
In case somebody does not use oc_filecache
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r-- | apps/files_versions/lib/storage.php | 7 |
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]); } } |