* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
use Wikimedia\Rdbms\IResultWrapper;
use Wikimedia\Rdbms\IDatabase;
use Wikimedia\Rdbms\DBError;
* @param int $offset Paging offset
*/
protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) {
- global $wgContLang;
-
if ( $num > 0 ) {
$html = [];
if ( !$this->listoutput ) {
}
$html = $this->listoutput
- ? $wgContLang->listToText( $html )
+ ? MediaWikiServices::getInstance()->getContentLanguage()->listToText( $html )
: implode( '', $html );
$out->addHTML( $html );
}
$title = Title::makeTitle( intval( $row->namespace ), $row->title );
if ( $title ) {
- $date = isset( $row->timestamp ) ? $row->timestamp : '';
+ $date = $row->timestamp ?? '';
$comments = '';
if ( $title ) {
$talkpage = $title->getTalkPage();
}
function feedItemAuthor( $row ) {
- return isset( $row->user_text ) ? $row->user_text : '';
+ return $row->user_text ?? '';
}
function feedTitle() {
$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();