Use cache directly instead of QB
In case somebody does not use oc_filecache
This commit is contained in:
parent
9a2c517ca8
commit
762636efcd
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue