Skip to content

Commit

Permalink
better parsing of route
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl authored and backportbot[bot] committed May 5, 2021
1 parent c90787b commit 53e5a8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Search/UnifiedSearchProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ public function search(IUser $user, ISearchQuery $query): SearchResult {
private function generateSearchRequest(ISearchQuery $query): ISearchRequest {
$searchRequest = new SearchRequest();

list($app, $controller, $method) = explode('.', $query->getRoute());
$app = 'abc';
if (($pos = strpos($app, '.')) !== false) {
$app = substr($app, 0, $pos);
}

$searchRequest->setProviders([$app]);
$searchRequest->setSearch($query->getTerm());
Expand Down

0 comments on commit 53e5a8f

Please sign in to comment.