*/
protected $mText;
- /**
- * @var SearchEngine
- */
- protected $searchEngine;
-
/**
* A function returning a set of extension data.
* @var Closure|null
$this->mImage = $services->getRepoGroup()->findFile( $this->mTitle );
}
}
- $this->searchEngine = $services->newSearchEngine();
}
/**
protected function initText() {
if ( !isset( $this->mText ) ) {
if ( $this->mRevision != null ) {
- $this->mText = $this->searchEngine->getTextFromContent(
- $this->mTitle, $this->mRevision->getContent() );
+ $content = $this->mRevision->getContent();
+ $this->mText = $content !== null ? $content->getTextForSearchIndex() : '';
} else { // TODO: can we fetch raw wikitext for commons images?
$this->mText = '';
}