1
0
mirror of https://github.com/flarum/core.git synced 2025-08-16 21:34:08 +02:00

Fix registering custom searchers, allow searchers without fulltext (#2755)

This commit is contained in:
Alexander Skvortsov
2021-04-19 16:59:53 -04:00
committed by GitHub
parent c84939b19c
commit 5e2340bf10
4 changed files with 62 additions and 22 deletions

View File

@@ -73,7 +73,7 @@ class SimpleFlarumSearch implements ExtenderInterface
public function extend(Container $container, Extension $extension = null)
{
if (! is_null($this->fullTextGambit)) {
$container->resolving('flarum.simple_search.fulltext_gambits', function ($oldFulltextGambits) {
$container->extend('flarum.simple_search.fulltext_gambits', function ($oldFulltextGambits) {
$oldFulltextGambits[$this->searcher] = $this->fullTextGambit;
return $oldFulltextGambits;