Skip to content

Commit

Permalink
Merge pull request #172 from Wikidata-lib/cacheFix
Browse files Browse the repository at this point in the history
Adapt EntitySelector to reworked _cache
  • Loading branch information
JonasKress committed Aug 4, 2016
2 parents 8932cc2 + 2a7c7ef commit 5a21fe7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PropertySuggester.php
Expand Up @@ -9,7 +9,7 @@
return;
}

define( 'PropertySuggester_VERSION', '3.1.1' );
define( 'PropertySuggester_VERSION', '3.1.2' );

if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
Expand Down
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -45,6 +45,9 @@ generate this data from a wikidata dump.

## Release notes

### 3.1.2 (2016-08-04)
* Follow up fix for entity suggester, update cache management in EntitySuggester.

### 3.1.1 (2016-08-03)
* Follow up fix for entity suggester, update method call in EntitySuggester.

Expand Down
7 changes: 4 additions & 3 deletions modules/ext.PropertySuggester.EntitySelector.js
Expand Up @@ -52,9 +52,10 @@
search: term,
context: this._getPropertyContext(),
format: 'json',
language: self.options.language,
'continue': self._cache[term] && self._cache[term].nextSuggestionOffset
? self._cache[term].nextSuggestionOffset : 0
language: this.options.language,
'continue': this._cache.term === term && this._cache.nextSuggestionOffset
? this._cache.nextSuggestionOffset
: 0
};
if( data.context == 'item' ) {
data.entity = self._getEntity().getId();
Expand Down

0 comments on commit 5a21fe7

Please sign in to comment.