X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryInfo.php;h=3b7b00de80c0adec5dbb4e89fff20479aa144967;hp=1d3c110c3a18080a8128bc2fbad6e73a2d9ac25a;hb=1de7117197761961736ea43b237599569eee93a2;hpb=c8f77e97faaecfb656042554fdc4d60d32ad39e8 diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 1d3c110c3a..3b7b00de80 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -522,7 +522,7 @@ class ApiQueryInfo extends ApiQueryBase { } if ( $this->params['testactions'] ) { - $limit = $this->getMain()->canApiHighLimits() ? self::LIMIT_SML1 : self::LIMIT_SML2; + $limit = $this->getMain()->canApiHighLimits() ? self::LIMIT_SML2 : self::LIMIT_SML1; if ( $this->countTestedActions >= $limit ) { return null; // force a continuation } @@ -764,12 +764,12 @@ class ApiQueryInfo extends ApiQueryBase { } private function getAllVariants( $text, $ns = NS_MAIN ) { - global $wgContLang; $result = []; - foreach ( $wgContLang->getVariants() as $variant ) { - $convertTitle = $wgContLang->autoConvert( $text, $variant ); + $contLang = MediaWikiServices::getInstance()->getContentLanguage(); + foreach ( $contLang->getVariants() as $variant ) { + $convertTitle = $contLang->autoConvert( $text, $variant ); if ( $ns !== NS_MAIN ) { - $convertNs = $wgContLang->convertNamespace( $ns, $variant ); + $convertNs = $contLang->convertNamespace( $ns, $variant ); $convertTitle = $convertNs . ':' . $convertTitle; } $result[$variant] = $convertTitle;