From: Rob Church Date: Sat, 23 Dec 2006 14:09:38 +0000 (+0000) Subject: (bug 7612) Remove superfluous link to Special:Categories from result items on Special... X-Git-Tag: 1.31.0-rc.0~54791 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=e783c5d41f2ac6a4d334e81fb0d5cf74e7b1a267;p=lhc%2Fweb%2Fwiklou.git (bug 7612) Remove superfluous link to Special:Categories from result items on Special:Mostcategories --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6a5099a314..2ece5367e3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -395,6 +395,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN on Special:Upload * (bug 8016) Purge objectcache table during upgrade processes - use the --nopurge option to prevent this when running maintennace/update.php +* (bug 7612) Remove superfluous link to Special:Categories from result items + on Special:Mostcategories == Languages updated == diff --git a/includes/SpecialMostcategories.php b/includes/SpecialMostcategories.php index 06002af26a..41bfb0cdb7 100644 --- a/includes/SpecialMostcategories.php +++ b/includes/SpecialMostcategories.php @@ -37,20 +37,11 @@ class MostcategoriesPage extends QueryPage { } function formatResult( $skin, $result ) { - global $wgContLang, $wgLang; - - $nt = Title::makeTitle( $result->namespace, $result->title ); - $text = $wgContLang->convert( $nt->getPrefixedText() ); - - $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text ); - - $nl = wfMsgExt( 'ncategories', array( 'parsemag', 'escape' ), - $wgLang->formatNum( $result->value ) ); - - $nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Categories' ), - $nl, 'article=' . $nt->getPrefixedURL() ); - - return wfSpecialList($plink, $nlink); + global $wgLang; + $title = Title::makeTitleSafe( $result->namespace, $result->title ); + $count = wfMsgExt( 'ncategories', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->value ) ); + $link = $skin->makeKnownLinkObj( $title, $title->getText() ); + return wfSpecialList( $link, $count ); } }