diff options
author | Robin Appelman <robin@icewind.nl> | 2021-06-14 16:17:43 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-06-14 16:23:08 +0200 |
commit | 362cb2a11f7a95762ecfc7662768442bca233018 (patch) | |
tree | 936a654f201c0ecfbc2cb021992df90ead8f2eda /lib/private/Files | |
parent | 66e10718c6109d0c02d603a5612fe4acc34c711f (diff) | |
download | nextcloud-server-362cb2a11f7a95762ecfc7662768442bca233018.tar.gz nextcloud-server-362cb2a11f7a95762ecfc7662768442bca233018.zip |
inject SearchBuilder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/Cache/Cache.php | 7 | ||||
-rw-r--r-- | lib/private/Files/Cache/QuerySearchHelper.php | 5 | ||||
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheWrapper.php | 7 |
3 files changed, 5 insertions, 14 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index c2f426acd2d..a19ae4e3a47 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -121,12 +121,7 @@ class Cache implements ICache { $this->mimetypeLoader = \OC::$server->getMimeTypeLoader(); $this->connection = \OC::$server->getDatabaseConnection(); $this->eventDispatcher = \OC::$server->get(IEventDispatcher::class); - $this->querySearchHelper = new QuerySearchHelper( - $this->mimetypeLoader, - $this->connection, - \OC::$server->getSystemConfig(), - \OC::$server->getLogger() - ); + $this->querySearchHelper = \OC::$server->query(QuerySearchHelper::class); } protected function getQueryBuilder() { diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php index 963c964aa61..683b580d9d1 100644 --- a/lib/private/Files/Cache/QuerySearchHelper.php +++ b/lib/private/Files/Cache/QuerySearchHelper.php @@ -52,13 +52,14 @@ class QuerySearchHelper { IMimeTypeLoader $mimetypeLoader, IDBConnection $connection, SystemConfig $systemConfig, - ILogger $logger + ILogger $logger, + SearchBuilder $searchBuilder ) { $this->mimetypeLoader = $mimetypeLoader; $this->connection = $connection; $this->systemConfig = $systemConfig; $this->logger = $logger; - $this->searchBuilder = new SearchBuilder($this->mimetypeLoader); + $this->searchBuilder = $searchBuilder; } protected function getQueryBuilder() { diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php index e25282942b2..8b8b4b6af80 100644 --- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php +++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php @@ -49,12 +49,7 @@ class CacheWrapper extends Cache { $this->cache = $cache; $this->mimetypeLoader = \OC::$server->getMimeTypeLoader(); $this->connection = \OC::$server->getDatabaseConnection(); - $this->querySearchHelper = new QuerySearchHelper( - $this->mimetypeLoader, - $this->connection, - \OC::$server->getSystemConfig(), - \OC::$server->getLogger() - ); + $this->querySearchHelper = \OC::$server->get(QuerySearchHelper::class); } protected function getCache() { |