diff --git a/lib/Search/CollectiveProvider.php b/lib/Search/CollectiveProvider.php index fc96aa471..153730296 100644 --- a/lib/Search/CollectiveProvider.php +++ b/lib/Search/CollectiveProvider.php @@ -66,7 +66,7 @@ public function getName(): string { * @return int */ public function getOrder(string $route, array $routeParameters): int { - if ($route === 'collectives.Start.index') { + if ($route === 'collectives.start.index') { // Collectives first when the app is active return -3; } @@ -98,7 +98,7 @@ public function search(IUser $user, ISearchQuery $query): SearchResult { '', $this->collectiveService->getCollectiveNameWithEmoji($collective), '', - $this->urlGenerator->linkToRoute('collectives.start.index') . '/' . rawurlencode($collective->getName()), + $this->urlGenerator->linkToRoute('collectives.start.index') . rawurlencode($collective->getName()), 'icon-collectives' ); } diff --git a/lib/Search/PageContentProvider.php b/lib/Search/PageContentProvider.php index 68ef4b4e5..6b6f4cc5d 100644 --- a/lib/Search/PageContentProvider.php +++ b/lib/Search/PageContentProvider.php @@ -81,7 +81,7 @@ public function getName(): string { * @return int */ public function getOrder(string $route, array $routeParameters): int { - if ($route === 'collectives.Start.index') { + if ($route === 'collectives.start.index') { return -1; } return 4; @@ -139,10 +139,7 @@ public function search(IUser $user, ISearchQuery $query): SearchResult { '', $highlighter->extractRelevant($query->getTerm(), $page->getContent(), $highlightLength, 5, ''), $collective->getName() . ' / ' . $pageInfo->getTitle(), - implode('/', array_filter([ - $this->urlGenerator->linkToRoute('collectives.start.index'), - $this->pageService->getPageLink($collective->getName(), $pageInfo) - ])), + $this->urlGenerator->linkToRoute('collectives.start.index') . $this->pageService->getPageLink($collective->getName(), $pageInfo), 'icon-collectives-page' ); } diff --git a/lib/Search/PageProvider.php b/lib/Search/PageProvider.php index 887e99a37..9422e0944 100644 --- a/lib/Search/PageProvider.php +++ b/lib/Search/PageProvider.php @@ -73,7 +73,7 @@ public function getName(): string { * @return int */ public function getOrder(string $route, array $routeParameters): int { - if ($route === 'collectives.Start.index') { + if ($route === 'collectives.start.index') { // Collective pages second when the app is active return -2; } @@ -106,10 +106,7 @@ public function search(IUser $user, ISearchQuery $query): SearchResult { ), $this->getPageTitle($pageInfo), $this->l10n->t('In collective %1$s', [$this->collectiveService->getCollectiveNameWithEmoji($collective)]), - implode('/', array_filter([ - $this->urlGenerator->linkToRouteAbsolute('collectives.start.index'), - $this->pageService->getPageLink($collective->getName(), $pageInfo) - ])), + $this->urlGenerator->linkToRoute('collectives.start.index') . $this->pageService->getPageLink($collective->getName(), $pageInfo), 'icon-collectives-page' ); }