* Magic word formatnum can now take raw suffix to undo formatting
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 15 Mar 2008 10:39:56 +0000 (10:39 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 15 Mar 2008 10:39:56 +0000 (10:39 +0000)
RELEASE-NOTES
includes/CoreParserFunctions.php

index dcae506..f785b62 100644 (file)
@@ -44,6 +44,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * 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 ===
 
index 594f018..9df3f7c 100644 (file)
@@ -138,8 +138,12 @@ class CoreParserFunctions {
                }
        }
 
-       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 = '' ) {