Skip to content

Commit

Permalink
inject SearchBuilder
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Jun 14, 2021
1 parent 66e1071 commit 362cb2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
7 changes: 1 addition & 6 deletions lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,7 @@ public function __construct(IStorage $storage) {
$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() {
Expand Down
5 changes: 3 additions & 2 deletions lib/private/Files/Cache/QuerySearchHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ public function __construct(
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() {
Expand Down
7 changes: 1 addition & 6 deletions lib/private/Files/Cache/Wrapper/CacheWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ public function __construct($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() {
Expand Down

0 comments on commit 362cb2a

Please sign in to comment.