Merge "Selenium: record video of every test"
[lhc/web/wiklou.git] / includes / specialpage / QueryPage.php
index 655b495..16a6d30 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup SpecialPage
  */
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\Rdbms\IResultWrapper;
 use Wikimedia\Rdbms\IDatabase;
 use Wikimedia\Rdbms\DBError;
@@ -690,8 +691,6 @@ abstract class QueryPage extends SpecialPage {
         * @param int $offset Paging offset
         */
        protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) {
-               global $wgContLang;
-
                if ( $num > 0 ) {
                        $html = [];
                        if ( !$this->listoutput ) {
@@ -726,7 +725,7 @@ abstract class QueryPage extends SpecialPage {
                        }
 
                        $html = $this->listoutput
-                               ? $wgContLang->listToText( $html )
+                               ? MediaWikiServices::getInstance()->getContentLanguage()->listToText( $html )
                                : implode( '', $html );
 
                        $out->addHTML( $html );
@@ -865,7 +864,7 @@ abstract class QueryPage extends SpecialPage {
 
                $batch = new LinkBatch;
                foreach ( $res as $row ) {
-                       $batch->add( $ns !== null ? $ns : $row->namespace, $row->title );
+                       $batch->add( $ns ?? $row->namespace, $row->title );
                }
                $batch->execute();