r32012 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32011‎ | r32012 | 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:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/CoreParserFunctions.php (modified) (history)

Diff [purge]

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

Status & tagging log