From: Niklas Laxström Date: Sat, 15 Mar 2008 10:39:56 +0000 (+0000) Subject: * Magic word formatnum can now take raw suffix to undo formatting X-Git-Tag: 1.31.0-rc.0~49084 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=0570fdb1db156c3f132822552396f270da63bdd3;p=lhc%2Fweb%2Fwiklou.git * Magic word formatnum can now take raw suffix to undo formatting --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index dcae5068a5..f785b62fca 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/CoreParserFunctions.php b/includes/CoreParserFunctions.php index 594f018e2e..9df3f7c6e5 100644 --- a/includes/CoreParserFunctions.php +++ b/includes/CoreParserFunctions.php @@ -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 = '' ) {