From c82d382a2020e598a58135841305da9395e7001e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 4 Jul 2024 19:20:46 +0200 Subject: feat: add base class for extending the query builder Signed-off-by: Robin Appelman --- apps/files_trashbin/lib/Trashbin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps') diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index 831bf0686ce..99fe35bca5f 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -31,8 +31,10 @@ use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\FilesMetadata\IFilesMetadataManager; use OCP\IConfig; +use OCP\IDBConnection; use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; +use OCP\Server; use Psr\Log\LoggerInterface; class Trashbin { @@ -983,10 +985,8 @@ class Trashbin { // Manually fetch all versions from the file cache to be able to filter them by their parent $cache = $storage->getCache(''); $query = new CacheQueryBuilder( - \OC::$server->getDatabaseConnection(), - \OC::$server->getSystemConfig(), - \OC::$server->get(LoggerInterface::class), - \OC::$server->get(IFilesMetadataManager::class), + Server::get(IDBConnection::class)->getQueryBuilder(), + Server::get(IFilesMetadataManager::class), ); $normalizedParentPath = ltrim(Filesystem::normalizePath(dirname('files_trashbin/versions/'. $filename)), '/'); $parentId = $cache->getId($normalizedParentPath); -- cgit v1.2.3