aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-07-15 14:53:22 +0200
committerGitHub <noreply@github.com>2024-07-15 14:53:22 +0200
commitf94b0c3f55f1a3f2b24a6f554cf5a67a4deae959 (patch)
tree2702e6d16da2b6667ec1ff3b4cc56143d07b97df /apps
parent7206b2dc41d6508678c9972817e64183b5196100 (diff)
parentc82d382a2020e598a58135841305da9395e7001e (diff)
downloadnextcloud-server-f94b0c3f55f1a3f2b24a6f554cf5a67a4deae959.tar.gz
nextcloud-server-f94b0c3f55f1a3f2b24a6f554cf5a67a4deae959.zip
Merge pull request #46397 from nextcloud/extended-query-builder-base
feat: add base class for extending the query builder
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/lib/Trashbin.php8
1 files changed, 4 insertions, 4 deletions
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);