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 1f242ff commit e3fe7d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [extensible search](https://packagist.org/packages/nglasl/silverstripe-extensible-search)

_The current release is **4.1.1**_
_The current release is **4.1.3**_

> This module allows user customisation and developer extension of a search page instance, including analytics and suggestions.
Expand Down
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 e3fe7d3

Please sign in to comment.