X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FPageQueryPage.php;h=ad66e319dfd5ad5caece16a959bf941d0a02f36a;hb=cd789d78b8073fa04983ad284e8e7cebe4296e6e;hp=f7f0499350ff1250a753c732ead61a39847a5e77;hpb=8ddf721b6feaf11c67aafc1445d255e68faa4007;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/PageQueryPage.php b/includes/specialpage/PageQueryPage.php index f7f0499350..ad66e319df 100644 --- a/includes/specialpage/PageQueryPage.php +++ b/includes/specialpage/PageQueryPage.php @@ -21,7 +21,8 @@ * @ingroup SpecialPage */ -use Wikimedia\Rdbms\ResultWrapper; +use MediaWiki\MediaWikiServices; +use Wikimedia\Rdbms\IResultWrapper; use Wikimedia\Rdbms\IDatabase; /** @@ -36,7 +37,7 @@ abstract class PageQueryPage extends QueryPage { * This should be done for live data and cached data. * * @param IDatabase $db - * @param ResultWrapper $res + * @param IResultWrapper $res */ public function preprocessResults( $db, $res ) { $this->executeLBFromResultWrapper( $res ); @@ -50,12 +51,11 @@ abstract class PageQueryPage extends QueryPage { * @return string */ public function formatResult( $skin, $row ) { - global $wgContLang; - $title = Title::makeTitleSafe( $row->namespace, $row->title ); if ( $title instanceof Title ) { - $text = $wgContLang->convert( $title->getPrefixedText() ); + $text = MediaWikiServices::getInstance()->getContentLanguage()-> + convert( $title->getPrefixedText() ); return $this->getLinkRenderer()->makeLink( $title, $text ); } else { return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ],