Skip to content

Commit

Permalink
fix: corrected wrong URL in autocomplete method, closes #2171
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Jul 3, 2022
1 parent e59ded5 commit 6ccaf00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion phpmyfaq/src/phpMyFAQ/Helper/SearchHelper.php
Expand Up @@ -102,7 +102,7 @@ public function renderInstantResponseResult(SearchResultSet $resultSet): string

// Build the link to the faq record
$currentUrl = sprintf(
'%sindex.php?%saction=faq&cat=%d&id=%d&artlang=%s&highlight=%s',
'%s?%saction=faq&cat=%d&id=%d&artlang=%s&highlight=%s',
$this->config->getDefaultUrl() . 'index.php',
$this->sessionId,
$result->category_id,
Expand Down
2 changes: 2 additions & 0 deletions phpmyfaq/src/phpMyFAQ/Search/Elasticsearch.php
Expand Up @@ -151,6 +151,8 @@ public function setCategoryIds(array $categoryIds): void
*/
public function autoComplete(string $searchTerm): array
{
$this->resultSet = [];

$searchParams = [
'index' => $this->esConfig['index'],
'size' => 100,
Expand Down

0 comments on commit 6ccaf00

Please sign in to comment.