* @return string
*/
function formatResult( $skin, $result ) {
- global $wgLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
- $count = wfMsgExt( 'ncategories', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->value ) );
- $link = $skin->link( $title );
+ $count = $this->msg( 'ncategories' )->numParams( $result->value )->escaped();
+ $link = Linker::link( $title );
return wfSpecialList( $link, $count );
}
}
}
function getCellHtml( $row ) {
- global $wgLang;
- return wfMsgExt( 'nimagelinks', array( 'parsemag', 'escape' ),
- $wgLang->formatNum( $row->value ) ) . '<br />';
+ return $this->msg( 'nimagelinks' )->numParams( $row->value )->escaped() . '<br />';
}
}
*
* @param $title Title being queried
* @param $caption String: text to display on the link
- * @param $skin Skin to use
* @return String
*/
- function makeWlhLink( &$title, $caption, &$skin ) {
+ function makeWlhLink( $title, $caption ) {
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedDBkey() );
- return $skin->linkKnown( $wlh, $caption );
+ return Linker::linkKnown( $wlh, $caption );
}
/**
* @return string
*/
function formatResult( $skin, $result ) {
- global $wgLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
if ( !$title ) {
return '<!-- ' . htmlspecialchars( "Invalid title: [[$title]]" ) . ' -->';
}
- $link = $skin->link( $title );
+ $link = Linker::link( $title );
$wlh = $this->makeWlhLink( $title,
- wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
- $wgLang->formatNum( $result->value ) ), $skin );
+ $this->msg( 'nlinks' )->numParams( $result->value )->escaped() );
return wfSpecialList( $link, $wlh );
}
}
* @return string
*/
function formatResult( $skin, $result ) {
- global $wgLang, $wgContLang;
+ global $wgContLang;
$nt = Title::makeTitle( NS_CATEGORY, $result->title );
$text = $wgContLang->convert( $nt->getText() );
- $plink = $skin->link( $nt, htmlspecialchars( $text ) );
+ $plink = Linker::link( $nt, htmlspecialchars( $text ) );
- $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
- $wgLang->formatNum( $result->value ) );
+ $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
return wfSpecialList( $plink, $nlinks );
}
}
$title = Title::makeTitle( $result->namespace, $result->title );
return wfSpecialList(
- $skin->link( $title ),
- $this->makeWlhLink( $title, $skin, $result )
+ Linker::link( $title ),
+ $this->makeWlhLink( $title, $result )
);
}
* Make a "what links here" link for a given title
*
* @param $title Title to make the link for
- * @param $skin Skin to use
* @param $result Result row
* @return String
*/
- private function makeWlhLink( $title, $skin, $result ) {
- global $wgLang;
- $wlh = SpecialPage::getTitleFor( 'Whatlinkshere' );
- $label = wfMsgExt( 'ntransclusions', array( 'parsemag', 'escape' ),
- $wgLang->formatNum( $result->value ) );
- return $skin->link( $wlh, $label, array(), array( 'target' => $title->getPrefixedText() ) );
+ private function makeWlhLink( $title, $result ) {
+ $wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() );
+ $label = $this->msg( 'ntransclusions' )->numParams( $result->value )->escaped();
+ return Linker::link( $wlh, $label );
}
}