diff options
author | Robin Appelman <robin@icewind.nl> | 2021-06-14 17:17:43 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-06-14 17:23:08 +0300 |
commit | 362cb2a11f7a95762ecfc7662768442bca233018 (patch) | |
tree | 936a654f201c0ecfbc2cb021992df90ead8f2eda /lib | |
parent | 66e10718c6109d0c02d603a5612fe4acc34c711f (diff) |
inject SearchBuilder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-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() { |