* Added many missing formatNum calls
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 8 May 2006 18:17:55 +0000 (18:17 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 8 May 2006 18:17:55 +0000 (18:17 +0000)
RELEASE-NOTES
includes/SpecialCategories.php
includes/SpecialMIMEsearch.php
includes/SpecialMostimages.php
includes/SpecialMostlinked.php
includes/SpecialMostlinkedcategories.php
includes/SpecialMostrevisions.php
includes/SpecialRecentchanges.php
includes/SpecialWantedcategories.php
includes/SpecialWantedpages.php

index cef3225..6935763 100644 (file)
@@ -226,6 +226,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5858) Update for Russian language (ru)
 * (bug 5860) Update for Indonesian language (id)
 * (bug 1120) Update for Czech language (Cs)
+* Added many missing formatNum calls
 
 == Compatibility ==
 
index 6ac593a..e5ff2b3 100644 (file)
@@ -50,9 +50,10 @@ class CategoriesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
+               global $wgLang;
                $title = Title::makeTitle( NS_CATEGORY, $result->title );
                $plink = $skin->makeLinkObj( $title, $title->getText() );
-               $nlinks = wfMsg( 'members', $result->count );
+               $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->count ) );
                return wfSpecialList($plink, $nlinks);
        }
 }
index 6789b61..f38d055 100644 (file)
@@ -72,7 +72,8 @@ class MIMEsearchPage extends QueryPage {
                $download = $skin->makeMediaLink( $nt->getText(), 'fuck me!', wfMsgHtml( 'download' ) );
                $bytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape'),
                        $wgLang->formatNum( $result->img_size ) );
-               $dimensions = wfMsg( 'widthheight', $result->img_width, $result->img_height );
+               $dimensions = wfMsg( 'widthheight', $wgLang->formatNum( $result->img_width ),
+                       $wgLang->formatNum( $result->img_height ) );
                $user = $skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text );
                $time = $wgLang->timeanddate( $result->img_timestamp );
 
index a10e5a1..d881e9b 100644 (file)
@@ -38,14 +38,14 @@ class MostimagesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
+               global $wgLang, $wgContLang;
 
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getPrefixedText() );
 
                $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
 
-               $nl = wfMsg( 'nlinks', $result->value );
+               $nl = wfMsg( 'nlinks', $wgLang->formatNum ( $result->value ) );
                $nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
 
                return wfSpecialList($plink, $nlink);
index 9f26a34..aa86a4c 100644 (file)
@@ -77,9 +77,11 @@ class MostlinkedPage extends QueryPage {
         * @return string
         */
        function formatResult( $skin, $result ) {
+               global $wgLang;
                $title = Title::makeTitleSafe( $result->namespace, $result->title );
                $link = $skin->makeLinkObj( $title );
-               $wlh = $this->makeWlhLink( $title, wfMsgHtml( 'nlinks', $result->value ), $skin );
+               $wlh = $this->makeWlhLink( $title, wfMsgHtml( 'nlinks',
+                       $wgLang->formatNum( $result->value ) ), $skin );
                return wfSpecialList( $link, $wlh );
        }
 }
index 35ee07f..53acbe7 100644 (file)
@@ -57,14 +57,14 @@ class MostlinkedCategoriesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
+               global $wgLang, $wgContLang;
 
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getText() );
 
                $plink = $skin->makeLinkObj( $nt, htmlspecialchars( $text ) );
 
-               $nlinks = wfMsg( 'members', $result->value );
+               $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->value ) );
                return wfSpecialList($plink, $nlinks);
        }
 }
index c8a04a5..9bef93c 100644 (file)
@@ -42,14 +42,14 @@ class MostrevisionsPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
+               global $wgLang, $wgContLang;
 
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getPrefixedText() );
 
                $plink = $skin->makeKnownLinkObj( $nt, $text );
 
-               $nl = wfMsg( 'nrevisions', $result->value );
+               $nl = wfMsg( 'nrevisions', $wgLang->formatNum( $result->value ) );
                $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' );
 
                return wfSpecialList($plink, $nlink);
index a3332e8..5b72cc0 100644 (file)
@@ -502,24 +502,21 @@ function rcOptionsPanel( $defaults, $nondefaults ) {
                $note = wfMsg( 'rcnote', $wgLang->formatNum( $options['limit'] ), $wgLang->formatNum( $options['days'] ), $wgLang->timeAndDate( wfTimestampNow(), true ) );
 
        // limit links
-       $cl = '';
        $options_limit = array(50, 100, 250, 500);
-       $i = 0;
-       while ( $i+1 < count($options_limit) ) {
-               $cl .=  makeOptionsLink( $options_limit[$i], array( 'limit' => $options_limit[$i] ), $nondefaults) . ' | ' ;
-               $i++;
+       foreach( $options_limit as $value ) {
+               $cl[] = makeOptionsLink( $wgLang->formatNum( $value ),
+                       array( 'limit' => $value ), $nondefaults) ;
        }
-       $cl .=  makeOptionsLink( $options_limit[$i], array( 'limit' => $options_limit[$i] ), $nondefaults) ;
+       $cl = implode( ' | ', $cl);
 
        // day links, reset 'from' to none
-       $dl = '';
        $options_days = array(1, 3, 7, 14, 30);
-       $i = 0;
-       while ( $i+1 < count($options_days) ) {
-               $dl .=  makeOptionsLink( $options_days[$i], array( 'days' => $options_days[$i], 'from' => '' ), $nondefaults) . ' | ' ;
-               $i++;
+       foreach( $options_days as $value ) {
+               $dl[] = makeOptionsLink( $wgLang->formatNum( $value ),
+                       array( 'days' => $value, 'from' => ''  ), $nondefaults) ;
        }
-       $dl .=  makeOptionsLink( $options_days[$i], array( 'days' => $options_days[$i], 'from' => '' ), $nondefaults) ;
+       $dl = implode( ' | ', $dl);
+
 
        // show/hide links
        $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ));
index d890d0f..a1b6d05 100644 (file)
@@ -59,7 +59,7 @@ class WantedCategoriesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
+               global $wgLang, $wgContLang;
 
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getText() );
@@ -68,7 +68,7 @@ class WantedCategoriesPage extends QueryPage {
                        $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) :
                        $skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
 
-               $nlinks = wfMsg( 'members', $result->value );
+               $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->value ) );
                return wfSpecialList($plink, $nlinks);
        }
 }
index 100c6c0..92958e8 100644 (file)
@@ -71,7 +71,7 @@ class WantedPagesPage extends QueryPage {
 
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
+               global $wgLang;
 
                $title = Title::makeTitleSafe( $result->namespace, $result->title );
 
@@ -91,8 +91,9 @@ class WantedPagesPage extends QueryPage {
                
                # Make a link to "what links here" if it's required
                $wlhLink = $this->nlinks
-                                       ? $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks', $result->value ) )
-                                       : "";
+                                       ? $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks',
+                                                       $wgLang->formatNum( $result->value ) ) )
+                                       : null;
                                        
                return wfSpecialList($pageLink, $wlhLink);
        }
@@ -106,7 +107,7 @@ class WantedPagesPage extends QueryPage {
         */
        function makeWlhLink( &$title, &$skin, $text ) {
                $wlhTitle = Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' );
-               return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() );               
+               return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() );
        }
        
 }