(bug 7612) Remove superfluous link to Special:Categories from result items on Special...
authorRob Church <robchurch@users.mediawiki.org>
Sat, 23 Dec 2006 14:09:38 +0000 (14:09 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sat, 23 Dec 2006 14:09:38 +0000 (14:09 +0000)
RELEASE-NOTES
includes/SpecialMostcategories.php

index 6a5099a..2ece536 100644 (file)
@@ -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 ==
 
index 06002af..41bfb0c 100644 (file)
@@ -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 );
        }
 }