Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/230292

Change subject: Use Config instead of globals
......................................................................

Use Config instead of globals

Follow up: I7ed79942c242b1957d46bdcad59985f37466fb83

Change-Id: Iff666a8ecc1f5c5a3fa1a34601fb74206a66b578
---
M includes/specials/SpecialSearch.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/230292/1

diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index e9c4042..629f88a 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -408,8 +408,6 @@
         * @return bool
         */
        protected function shouldRunSuggestedQuery( SearchResultSet 
$textMatches ) {
-               global $wgSearchRunSuggestedQueryPercent;
-
                if ( !$this->runSuggestion ||
                        !$textMatches->hasSuggestion() ||
                        $textMatches->numRows() > 0 ||
@@ -421,7 +419,7 @@
                // 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;
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/230292
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff666a8ecc1f5c5a3fa1a34601fb74206a66b578
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to