Merge "selenium: invoke jobs to enforce eventual consistency"
[lhc/web/wiklou.git] / includes / api / ApiQueryInfo.php
index 1d3c110..3b7b00d 100644 (file)
@@ -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;