X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWikiMap.php;h=cf97984ce17b25ebd5be6cf65860510fc22c89c8;hb=3e433dd09d5f65edc281c140fcd9a4cc056d1d16;hp=dca0f32697b0f72794751a8cb286f275c617b34c;hpb=734ca2b4d2a1246fb0ea1e54b861ab423ab5e257;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WikiMap.php b/includes/WikiMap.php index dca0f32697..cf97984ce1 100644 --- a/includes/WikiMap.php +++ b/includes/WikiMap.php @@ -73,13 +73,8 @@ class WikiMap { * @return WikiReference|null WikiReference object or null if the wiki was not found */ private static function getWikiWikiReferenceFromSites( $wikiID ) { - static $siteStore = null; - if ( !$siteStore ) { - // Replace once T114471 got fixed and don't do the caching here. - $siteStore = SiteSQLStore::newInstance(); - } - - $site = $siteStore->getSite( $wikiID ); + $siteLookup = \MediaWiki\MediaWikiServices::getInstance()->getSiteLookup(); + $site = $siteLookup->getSite( $wikiID ); if ( !$site instanceof MediaWikiSite ) { // Abort if not a MediaWikiSite, as this is about Wikis @@ -221,10 +216,10 @@ class WikiReference { * @return string relative URL, without the server part. */ private function getLocalUrl( $page, $fragmentId = null ) { - $page = wfUrlEncode( str_replace( ' ', '_', $page ) ); + $page = wfUrlencode( str_replace( ' ', '_', $page ) ); if ( is_string( $fragmentId ) && $fragmentId !== '' ) { - $page .= '#' . wfUrlEncode( $fragmentId ); + $page .= '#' . wfUrlencode( $fragmentId ); } return str_replace( '$1', $page, $this->mPath );