Merge pull request #22270 from owncloud/use-cache-directly

Use cache directly instead of QueryBuilder
This commit is contained in:
Thomas Müller 2016-02-10 14:23:04 +01:00
commit c4d2f6bb25
1 changed files with 2 additions and 5 deletions

View File

@ -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]);
}
}