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

Commit

Permalink
[FIX] Resolving a namespace issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed Aug 26, 2019
1 parent e3fe7d3 commit 44b29c0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 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.3**_
_The current release is **4.1.4**_

> This module allows user customisation and developer extension of a search page instance, including analytics and suggestions.
Expand Down
2 changes: 1 addition & 1 deletion src/services/ExtensibleSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function logSuggestion($term, $pageID) {

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

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

Expand Down
13 changes: 0 additions & 13 deletions tests/UnitTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,9 @@ public function testSearchResults() {

public function testAnalytics() {

// The full-text search needs to be selected.

$page = ExtensibleSearchPage::get()->first();
$page->SearchEngine = 'Full-Text';
$page->write();
$controller = ModelAsController::controller_for($page);

// Instantiate a searchable page.

$searchable = SiteTree::create(
array(
'Title' => 'Test'
)
);
$searchable->write();

// This shouldn't find anything, since the query doesn't match the page.

$data = array(
Expand Down

0 comments on commit 44b29c0

Please sign in to comment.