Skip to content

Commit

Permalink
fix deprecated StoreFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
xchrdw committed Jun 9, 2014
1 parent b4b21d7 commit cc59473
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/PropertySuggester/GetSuggestions.php
Expand Up @@ -12,7 +12,6 @@
use Wikibase\EntityTitleLookup;
use Wikibase\Lib\Store\EntityLookup;
use Wikibase\Repo\WikibaseRepo;
use Wikibase\StoreFactory;
use Wikibase\TermIndex;
use Wikibase\Utils;

Expand Down Expand Up @@ -53,12 +52,12 @@ public function __construct( ApiMain $main, $name, $prefix = '' ) {
global $wgPropertySuggesterDeprecatedIds;
global $wgPropertySuggesterMinProbability;

$this->termIndex = StoreFactory::getStore( 'sqlstore' )->getTermIndex();
$this->entityLookup = StoreFactory::getStore( 'sqlstore' )->getEntityLookup();
$store = WikibaseRepo::getDefaultInstance()->getStore();
$this->termIndex = $store->getTermIndex();
$this->entityLookup = $store->getEntityLookup();
$this->entityTitleLookup = WikibaseRepo::getDefaultInstance()->getEntityTitleLookup();

$this->suggester = new SimpleSuggester( wfGetLB() );

$this->suggester->setDeprecatedPropertyIds( $wgPropertySuggesterDeprecatedIds );

$this->paramsParser = new SuggesterParamsParser( 500, $wgPropertySuggesterMinProbability );
Expand Down

0 comments on commit cc59473

Please sign in to comment.