Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
fix(disabesavings): Disable the search suggestions savings if set fal…
Browse files Browse the repository at this point in the history
…se in config. (#27)
  • Loading branch information
KhushbuFuletra authored and Nathan Glasl committed Aug 25, 2019
1 parent 0478e98 commit 9718a2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/ExtensibleSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public function logSearch($term, $results, $time, $engine, $pageID) {

public function logSuggestion($term, $pageID) {

// Make sure the search matches the minimum autocomplete length.
// Make sure the search suggestions are enabled, and the search matches the minimum autocomplete length.

if(strlen($term) < 3) {
if(!Config::inst()->get('ExtensibleSearchSuggestion', 'enable_suggestions') || (strlen($term) < 3)) {
return null;
}

Expand Down

0 comments on commit 9718a2f

Please sign in to comment.