X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finterwiki%2FClassicInterwikiLookup.php;h=05cf933345d68e2cd85b8080e4cd32b0a93a6858;hb=b7a0bafb4b64a02bb209853b37b3d8939ee9ffdc;hp=d5103da97705c4535a6ddfe1a26c5319fcf9c6fa;hpb=63eebc01c48aee45f9c219cadf2e0e81f5a2043e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/interwiki/ClassicInterwikiLookup.php b/includes/interwiki/ClassicInterwikiLookup.php index d5103da977..05cf933345 100644 --- a/includes/interwiki/ClassicInterwikiLookup.php +++ b/includes/interwiki/ClassicInterwikiLookup.php @@ -53,7 +53,7 @@ class ClassicInterwikiLookup implements InterwikiLookup { /** * @var Language */ - private $contentLanguage; + private $contLang; /** * @var WANObjectCache @@ -91,7 +91,7 @@ class ClassicInterwikiLookup implements InterwikiLookup { private $thisSite = null; /** - * @param Language $contentLanguage Language object used to convert prefixes to lower case + * @param Language $contLang Language object used to convert prefixes to lower case * @param WANObjectCache $objectCache Cache for interwiki info retrieved from the database * @param int $objectCacheExpiry Expiry time for $objectCache, in seconds * @param bool|array|string $cdbData The path of a CDB file, or @@ -104,7 +104,7 @@ class ClassicInterwikiLookup implements InterwikiLookup { * @param string $fallbackSite The code to assume for the local site, */ function __construct( - Language $contentLanguage, + Language $contLang, WANObjectCache $objectCache, $objectCacheExpiry, $cdbData, @@ -113,7 +113,7 @@ class ClassicInterwikiLookup implements InterwikiLookup { ) { $this->localCache = new MapCacheLRU( 100 ); - $this->contentLanguage = $contentLanguage; + $this->contLang = $contLang; $this->objectCache = $objectCache; $this->objectCacheExpiry = $objectCacheExpiry; $this->cdbData = $cdbData; @@ -144,7 +144,7 @@ class ClassicInterwikiLookup implements InterwikiLookup { return null; } - $prefix = $this->contentLanguage->lc( $prefix ); + $prefix = $this->contLang->lc( $prefix ); if ( $this->localCache->has( $prefix ) ) { return $this->localCache->get( $prefix ); } @@ -314,10 +314,10 @@ class ClassicInterwikiLookup implements InterwikiLookup { private function loadFromArray( $mc ) { if ( isset( $mc['iw_url'] ) ) { $url = $mc['iw_url']; - $local = isset( $mc['iw_local'] ) ? $mc['iw_local'] : 0; - $trans = isset( $mc['iw_trans'] ) ? $mc['iw_trans'] : 0; - $api = isset( $mc['iw_api'] ) ? $mc['iw_api'] : ''; - $wikiId = isset( $mc['iw_wikiid'] ) ? $mc['iw_wikiid'] : ''; + $local = $mc['iw_local'] ?? 0; + $trans = $mc['iw_trans'] ?? 0; + $api = $mc['iw_api'] ?? ''; + $wikiId = $mc['iw_wikiid'] ?? ''; return new Interwiki( null, $url, $api, $wikiId, $local, $trans ); }