aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-07-04 19:20:46 +0200
committerRobin Appelman <robin@icewind.nl>2024-07-12 17:01:39 +0200
commitc82d382a2020e598a58135841305da9395e7001e (patch)
treec6c052c5d88fe254dd30c729d924bbbbea9057fa /apps
parent86f5fb0c9b9f0d4fd9721d05f04d6dedb5315c29 (diff)
downloadnextcloud-server-c82d382a2020e598a58135841305da9395e7001e.tar.gz
nextcloud-server-c82d382a2020e598a58135841305da9395e7001e.zip
feat: add base class for extending the query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
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);