* Added formatNum call
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 8 May 2006 16:58:07 +0000 (16:58 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 8 May 2006 16:58:07 +0000 (16:58 +0000)
* Support for {{plural:}} (ref 5805)

RELEASE-NOTES
includes/SpecialMostcategories.php

index 21db1b7..cef3225 100644 (file)
@@ -212,7 +212,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   Special:Wantedcategories and Special:Mostlinkedcategories.
 * (bug 3309) Allow comments when undeleting pages
 * Clean up Special:Undelete a bit
-* (bug 5805) message nbytes can now use {{plural:}}
+* (bug 5805) messages nbytes, ncategories can now use {{plural:}}
 * Clean up Special:Imagelist a bit
 * (bug 5838) Namespace names for Nds-NL
 * (bug 5749) Added Tyvan language files
index 2a188d9..aa53323 100644 (file)
@@ -40,15 +40,18 @@ class MostcategoriesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
+               global $wgContLang, $wgLang;
 
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getPrefixedText() );
 
                $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
 
-               $nl = wfMsg( 'ncategories', $result->value );
-               $nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Categories' ), $nl, 'article=' . $nt->getPrefixedURL() );
+               $nl = wfMsgExt( 'ncategories', array( 'parsemag', 'escape' ),
+                       $wgLang->formatNum( $result->value ) );
+
+               $nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Categories' ),
+                       $nl, 'article=' . $nt->getPrefixedURL() );
 
                return wfSpecialList($plink, $nlink);
        }