MediaWiki r32012 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r32011‎ | r32012 (on ViewVC)‎ | r32013 >
Date:10:39, 15 March 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Magic word formatnum can now take raw suffix to undo formatting
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/CoreParserFunctions.php
===================================================================
--- trunk/phase3/includes/CoreParserFunctions.php	(revision 32011)
+++ trunk/phase3/includes/CoreParserFunctions.php	(revision 32012)
@@ -138,8 +138,12 @@
 		}
 	}
 
-	static function formatNum( $parser, $num = '' ) {
-		return $parser->getFunctionLang()->formatNum( $num );
+	static function formatNum( $parser, $num = '', $raw = null) {
+		if ( self::israw( $raw ) ) {
+			return $parser->getFunctionLang()->parseFormattedNumber( $num );
+		} else {
+			return $parser->getFunctionLang()->formatNum( $num );
+		}
 	}
 
 	static function grammar( $parser, $case = '', $word = '' ) {
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES	(revision 32011)
+++ trunk/phase3/RELEASE-NOTES	(revision 32012)
@@ -44,6 +44,7 @@
 * When a page doesn't exist, the tab should say "create", not "edit"
 * (bug 12882) Added a span with class "patrollink" arround "Mark as patrolled"
   link on diffs
+* Magic word formatnum can now take raw suffix to undo formatting
 
 === Bug fixes in 1.13 ===
 

Status & tagging log

  • 15:25, 12 September 2011 Meno25 (Talk | contribs) changed the status of r32012 [removed: ok added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox