Follow up: I7ed79942c242b1957d46bdcad59985f37466fb83
Change-Id: Iff666a8ecc1f5c5a3fa1a34601fb74206a66b578
* @return bool
*/
protected function shouldRunSuggestedQuery( SearchResultSet $textMatches ) {
- global $wgSearchRunSuggestedQueryPercent;
-
if ( !$this->runSuggestion ||
!$textMatches->hasSuggestion() ||
$textMatches->numRows() > 0 ||
// Generate a random number between 0 and 1. If the
// number is less than the desired percentages run it.
$rand = rand( 0, getrandmax() ) / getrandmax();
- return $wgSearchRunSuggestedQueryPercent > $rand;
+ return $this->getConfig()->get( 'SearchRunSuggestedQueryPercent' ) > $rand;
}
/**