r47392 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r47391 | r47392 (on ViewVC) | r47393 >
Date:23:05, 17 February 2009
Author:aaron
Status:new (Comments)
Tags:
Comment:Rename new ACTIVEUSERS word to NUMBEROFACTIVEUSERS
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
===================================================================
--- trunk/phase3/includes/parser/Parser.php	(revision 47391)
+++ trunk/phase3/includes/parser/Parser.php	(revision 47392)
@@ -2492,7 +2492,7 @@
 				return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::images() );
 			case 'numberofusers':
 				return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::users() );
-			case 'activeusers':
+			case 'numberofactiveusers':
 				return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::activeUsers() );
 			case 'numberofpages':
 				return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::pages() );
Index: trunk/phase3/includes/parser/CoreParserFunctions.php
===================================================================
--- trunk/phase3/includes/parser/CoreParserFunctions.php	(revision 47391)
+++ trunk/phase3/includes/parser/CoreParserFunctions.php	(revision 47392)
@@ -31,7 +31,7 @@
 		$parser->setFunctionHook( 'plural',           array( __CLASS__, 'plural'           ), SFH_NO_HASH );
 		$parser->setFunctionHook( 'numberofpages',    array( __CLASS__, 'numberofpages'    ), SFH_NO_HASH );
 		$parser->setFunctionHook( 'numberofusers',    array( __CLASS__, 'numberofusers'    ), SFH_NO_HASH );
-		$parser->setFunctionHook( 'activeusers',      array( __CLASS__, 'activeusers'      ), SFH_NO_HASH );
+		$parser->setFunctionHook( 'numberofactiveusers', array( __CLASS__, 'numberofactiveusers' ), SFH_NO_HASH );
 		$parser->setFunctionHook( 'numberofarticles', array( __CLASS__, 'numberofarticles' ), SFH_NO_HASH );
 		$parser->setFunctionHook( 'numberoffiles',    array( __CLASS__, 'numberoffiles'    ), SFH_NO_HASH );
 		$parser->setFunctionHook( 'numberofadmins',   array( __CLASS__, 'numberofadmins'   ), SFH_NO_HASH );
@@ -245,7 +245,7 @@
 	static function numberofusers( $parser, $raw = null ) {
 		return self::formatRaw( SiteStats::users(), $raw );
 	}
-	static function activeusers( $parser, $raw = null ) {
+	static function numberofactiveusers( $parser, $raw = null ) {
 		return self::formatRaw( SiteStats::activeUsers(), $raw );
 	}
 	static function numberofarticles( $parser, $raw = null ) {
Index: trunk/phase3/includes/MagicWord.php
===================================================================
--- trunk/phase3/includes/MagicWord.php	(revision 47391)
+++ trunk/phase3/includes/MagicWord.php	(revision 47392)
@@ -90,7 +90,7 @@
 		'subjectpagename',
 		'subjectpagenamee',
 		'numberofusers',
-		'activeusers',
+		'numberofactiveusers',
 		'newsectionlink',
 		'numberofpages',
 		'currentversion',
@@ -142,7 +142,7 @@
 		'localweek' => 3600,
 		'localdow' => 3600,
 		'numberofusers' => 3600,
-		'activeusers' => 3600,
+		'numberofactiveusers' => 3600,
 		'numberofpages' => 3600,
 		'currentversion' => 86400,
 		'currenttimestamp' => 3600,
Index: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php	(revision 47391)
+++ trunk/phase3/languages/messages/MessagesEn.php	(revision 47392)
@@ -232,7 +232,7 @@
 	'numberofarticles'       => array( 1,    'NUMBEROFARTICLES'       ),
 	'numberoffiles'          => array( 1,    'NUMBEROFFILES'          ),
 	'numberofusers'          => array( 1,    'NUMBEROFUSERS'          ),
-	'activeusers'            => array( 1,    'ACTIVEUSERS', 'NUMBEROFACTIVEUSERS' ),
+	'numberofactiveusers'    => array( 1,    'NUMBEROFACTIVEUSERS'    ),
 	'numberofedits'          => array( 1,    'NUMBEROFEDITS'          ),
 	'numberofviews'          => array( 1,    'NUMBEROFVIEWS'          ),
 	'pagename'               => array( 1,    'PAGENAME'               ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r47433Follow up r47392: Rename magic word for existing translations tooraymond08:25, 18 February 2009

Comments

#Comment by Werdna (Talk | contribs)   23:44, 17 February 2009

You didn't "rename" it, you removed a perfectly functional alias. Why?

#Comment by Remember the dot (Talk | contribs)   04:52, 18 February 2009
#Comment by Raymond (Talk | contribs)   08:27, 18 February 2009

Follow up r47433: Rename magic word for existing translations too

Views
Toolbox