Merge pull request #22270 from owncloud/use-cache-directly
Use cache directly instead of QueryBuilder
This commit is contained in:
commit
c4d2f6bb25
|
@ -169,11 +169,8 @@ class Storage {
|
||||||
|
|
||||||
// Keep the "encrypted" value of the original file
|
// Keep the "encrypted" value of the original file
|
||||||
$oldVersion = $files_view->getFileInfo($filename)->getEncryptedVersion();
|
$oldVersion = $files_view->getFileInfo($filename)->getEncryptedVersion();
|
||||||
$qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
|
$cache = $newFileInfo->getStorage()->getCache();
|
||||||
$qb->update('filecache')
|
$cache->update($newFileInfo->getId(), ['encrypted' => $oldVersion, 'encryptedVersion' => $oldVersion]);
|
||||||
->set('encrypted', $qb->createNamedParameter($oldVersion))
|
|
||||||
->where($qb->expr()->eq('fileid', $qb->createNamedParameter($newFileInfo->getId())))
|
|
||||||
->execute();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue