From 8ebfb9dd0f31e0cde478a0b0e7e06dd6a6022b7a Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 26 Sep 2011 11:33:30 +0000 Subject: [PATCH] * Call Linker methods statically * Use local context instead of global variables --- includes/specials/SpecialFewestrevisions.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/includes/specials/SpecialFewestrevisions.php b/includes/specials/SpecialFewestrevisions.php index aa0611c8ab..bbeceae7a0 100644 --- a/includes/specials/SpecialFewestrevisions.php +++ b/includes/specials/SpecialFewestrevisions.php @@ -70,24 +70,20 @@ class FewestrevisionsPage extends QueryPage { * @param $result Object: database row */ function formatResult( $skin, $result ) { - global $wgLang, $wgContLang; + global $wgContLang; $nt = Title::makeTitleSafe( $result->namespace, $result->title ); if( !$nt ) { return ''; } - $text = $wgContLang->convert( $nt->getPrefixedText() ); + $text = htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) ); + $plink = Linker::linkKnown( $nt, $text ); - $plink = $skin->linkKnown( - $nt, - $text - ); - - $nl = wfMsgExt( 'nrevisions', array( 'parsemag', 'escape' ), - $wgLang->formatNum( $result->value ) ); - $redirect = isset( $result->redirect ) ? ' - ' . wfMsgHtml( 'isredirect' ) : ''; - $nlink = $skin->linkKnown( + $nl = $this->msg( 'nrevisions' )->numParams( $result->value )->escaped(); + $redirect = isset( $result->redirect ) && $result->redirect ? + ' - ' . wfMsgHtml( 'isredirect' ) : ''; + $nlink = Linker::linkKnown( $nt, $nl, array(), -- 2.20.1