Merge "Remove unused method Title::validateFileMoveOperation()"
[lhc/web/wiklou.git] / includes / specialpage / QueryPage.php
index 96f50bf..579ca19 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 ) {
@@ -700,7 +699,6 @@ abstract class QueryPage extends SpecialPage {
 
                        # $res might contain the whole 1,000 rows, so we read up to
                        # $num [should update this to use a Pager]
-                       // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                        for ( $i = 0; $i < $num && $row = $res->fetchObject(); $i++ ) {
                                $line = $this->formatResult( $skin, $row );
                                if ( $line ) {
@@ -726,7 +724,7 @@ abstract class QueryPage extends SpecialPage {
                        }
 
                        $html = $this->listoutput
-                               ? $wgContLang->listToText( $html )
+                               ? MediaWikiServices::getInstance()->getContentLanguage()->listToText( $html )
                                : implode( '', $html );
 
                        $out->addHTML( $html );