X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryLangLinks.php;h=f33a67fe96efca3ce7536fd11226f25072eafa32;hb=add9bd191fd4d16250b301208600854cb52f6b33;hp=2d8e44cda525f9b0d55401560e6157486449f96d;hpb=faf7cc4a09848c538320bd2b9067b1a77c0a0183;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryLangLinks.php b/includes/api/ApiQueryLangLinks.php index 2d8e44cda5..f33a67fe96 100644 --- a/includes/api/ApiQueryLangLinks.php +++ b/includes/api/ApiQueryLangLinks.php @@ -20,6 +20,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * A query module to list all langlinks (links to corresponding foreign language pages). * @@ -140,7 +142,6 @@ class ApiQueryLangLinks extends ApiQueryBase { } public function getAllowedParams() { - global $wgContLang; return [ 'prop' => [ ApiBase::PARAM_ISMULTI => true, @@ -160,7 +161,7 @@ class ApiQueryLangLinks extends ApiQueryBase { 'descending' ] ], - 'inlanguagecode' => $wgContLang->getCode(), + 'inlanguagecode' => MediaWikiServices::getInstance()->getContentLanguage()->getCode(), 'limit' => [ ApiBase::PARAM_DFLT => 10, ApiBase::PARAM_TYPE => 'limit',