diff options
Diffstat (limited to 'includes/specials/SpecialMostlinkedtemplates.php')
-rw-r--r-- | includes/specials/SpecialMostlinkedtemplates.php | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/includes/specials/SpecialMostlinkedtemplates.php b/includes/specials/SpecialMostlinkedtemplates.php index d597a4e0..2d398a38 100644 --- a/includes/specials/SpecialMostlinkedtemplates.php +++ b/includes/specials/SpecialMostlinkedtemplates.php @@ -92,15 +92,12 @@ class SpecialMostlinkedtemplates extends QueryPage { */ public function formatResult( $skin, $result ) { $title = Title::makeTitleSafe( $result->namespace, $result->title ); - if( $title instanceof Title ) { - return wfSpecialList( - $skin->makeLinkObj( $title ), - $this->makeWlhLink( $title, $skin, $result ) - ); - } else { - $tsafe = htmlspecialchars( $result->title ); - return "Invalid title in result set; {$tsafe}"; - } + + $skin->link( $title ); + return wfSpecialList( + $skin->makeLinkObj( $title ), + $this->makeWlhLink( $title, $skin, $result ) + ); } /** @@ -115,8 +112,8 @@ class SpecialMostlinkedtemplates extends QueryPage { global $wgLang; $wlh = SpecialPage::getTitleFor( 'Whatlinkshere' ); $label = wfMsgExt( 'nlinks', array( 'parsemag', 'escape' ), - $wgLang->formatNum( $result->value ) ); - return $skin->makeKnownLinkObj( $wlh, $label, 'target=' . $title->getPrefixedUrl() ); + $wgLang->formatNum( $result->value ) ); + return $skin->link( $wlh, $label, array(), array( 'target' => $title->getPrefixedText() ) ); } } |