X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=includes%2Fsearch%2FSearchEngine.php;h=0cb91fa5b2a86830659b2408679c626caa5db857;hb=a123a76c8a8b289ff7c0211c466c128b4ede06ef;hp=04d289d6d39421484c9e015c1d63edcd56a57da2;hpb=2ff455acb7c8ed543da3fd47bd357ad4bb8f8c34;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 04d289d6d3..0cb91fa5b2 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -148,7 +148,7 @@ class SearchEngine { * Really find the title match. */ private static function getNearMatchInternal( $searchterm ) { - global $wgContLang; + global $wgContLang, $wgEnableSearchContributorsByIP; $allSearchTerms = array( $searchterm ); @@ -215,10 +215,13 @@ class SearchEngine { $title = Title::newFromText( $searchterm ); + # Entering an IP address goes to the contributions page - if ( ( $title->getNamespace() == NS_USER && User::isIP( $title->getText() ) ) - || User::isIP( trim( $searchterm ) ) ) { - return SpecialPage::getTitleFor( 'Contributions', $title->getDBkey() ); + if ( $wgEnableSearchContributorsByIP ) { + if ( ( $title->getNamespace() == NS_USER && User::isIP( $title->getText() ) ) + || User::isIP( trim( $searchterm ) ) ) { + return SpecialPage::getTitleFor( 'Contributions', $title->getDBkey() ); + } }