Skip to content

Commit

Permalink
Fixing SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed May 17, 2022
1 parent f96ccc4 commit a1d1b4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion administrator/components/com_finder/src/Indexer/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -1362,14 +1362,19 @@ protected function getTokenData($token)
{
$searchTerm .= '%';
$searchStem .= '%';
$query->where('(t.term LIKE ' . $db->quote($searchTerm) . ' OR t.stem LIKE ' . $db->quote($searchStem) . ')');
}
elseif ($this->wordmode === 'fuzzy')
{
$searchTerm = '%' . $searchTerm . '%';
$searchStem = '%' . $searchStem . '%';
$query->where('(t.term LIKE ' . $db->quote($searchTerm) . ' OR t.stem LIKE ' . $db->quote($searchStem) . ')');
}
else
{
$query->where('(t.term = ' . $db->quote($searchTerm) . ' OR t.stem = ' . $db->quote($searchStem) . ')');
}

$query->where('(t.term = ' . $db->quote($searchTerm) . ' OR t.stem = ' . $db->quote($searchStem) . ')');
$query->where('t.phrase = 0')
->where('t.language IN (\'*\',' . $db->quote($token->language) . ')');
}
Expand Down

0 comments on commit a1d1b4f

Please sign in to comment.