From e606580997c5376ffd672aae1b9f73aeb81033c8 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 24 Jun 2006 21:52:52 +0000 Subject: [PATCH] Revert for now so brion can sleep at night and so that I don't get kidnapped and shipped off to Jo'burg --- RELEASE-NOTES | 1 - includes/ChangesList.php | 19 ++++++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f2e313c4b7..9e37d62414 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -560,7 +560,6 @@ Some default configuration options have changed: * (bug 5903) When requesting the raw source of a non-existent message page, return blank content (as opposed to the message key) * Improve default blank content of MediaWiki:Common.css and MediaWiki:Monobook.css -* (bug 5852) Localise "number of watching users" according to user locale == Compatibility == diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 8e3b607cfd..b2c1abe243 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -213,16 +213,6 @@ class ChangesList { return( $wgUseRCPatrol && $wgUser->isAllowed( 'patrol' ) ); } - /** - * Format a number according to the user's locale - * - * @param $number Number to format - * @return string - */ - function formatNum( $number ) { - global $wgLang; - return $wgLang->formatNum( $number ); - } } @@ -235,6 +225,7 @@ class OldChangesList extends ChangesList { * Format a line using the old system (aka without any javascript). */ function recentChangesLine( &$rc, $watched = false ) { + global $wgContLang; $fname = 'ChangesList::recentChangesLineOld'; wfProfileIn( $fname ); @@ -277,7 +268,7 @@ class OldChangesList extends ChangesList { $this->insertComment($s, $rc); if($rc->numberofWatchingusers > 0) { - $s .= ' ' . wfMsg('number_of_watching_users_RCview', $this->formatNum( $rc->numberofWatchingusers ) ); + $s .= ' ' . wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rc->numberofWatchingusers)); } $s .= "\n"; @@ -482,7 +473,8 @@ class EnhancedChangesList extends ChangesList { $r .= $users; if($block[0]->numberofWatchingusers > 0) { - $r .= wfMsg('number_of_watching_users_RCview', $this->formatNum($block[0]->numberofWatchingusers)); + global $wgContLang; + $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($block[0]->numberofWatchingusers)); } $r .= "
\n"; @@ -583,6 +575,7 @@ class EnhancedChangesList extends ChangesList { * @return string a HTML formated line (generated using $r) */ function recentChangesBlockLine( $rcObj ) { + global $wgContLang; # Get rc_xxxx variables extract( $rcObj->mAttribs ); @@ -621,7 +614,7 @@ class EnhancedChangesList extends ChangesList { } if( $rcObj->numberofWatchingusers > 0 ) { - $r .= wfMsg('number_of_watching_users_RCview', $this->formatNum( $rcObj->numberofWatchingusers ) ); + $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rcObj->numberofWatchingusers)); } $r .= "
\n"; -- 2.20.1