From 0570fdb1db156c3f132822552396f270da63bdd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 15 Mar 2008 10:39:56 +0000 Subject: [PATCH] * Magic word formatnum can now take raw suffix to undo formatting --- RELEASE-NOTES | 1 + includes/CoreParserFunctions.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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 = '' ) { -- 2.20.1