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 23, 2019
1 parent c389acf commit 8676c94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/services/ExtensibleSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,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 8676c94

Please sign in to comment.