X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FQueryPage.php;h=16a6d303d8938c77c2859957ffb1c4c5c48ef45e;hb=1658759d42a5d802e29a71c3fd70ae127afd3e46;hp=655b495e771bdc9cba937d911890cc0830c5c440;hpb=f459a71f75941a83335d6d63ee12079a4b586793;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/QueryPage.php b/includes/specialpage/QueryPage.php index 655b495e77..16a6d303d8 100644 --- a/includes/specialpage/QueryPage.php +++ b/includes/specialpage/QueryPage.php @@ -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();