Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
BBC RussianHomePhabricator
Log In
Files F8845

ParserFunctions.diff

Authored By
bzimport
Nov 22 2014, 12:10 AM
Size
977 B
Referenced Files
None
Subscribers
None

ParserFunctions.diff

Index: ParserFunctions_body.php
===================================================================
--- ParserFunctions_body.php (revision 110730)
+++ ParserFunctions_body.php (working copy)
@@ -81,7 +81,10 @@
*/
public static function expr( $parser, $expr = '' ) {
try {
- return self::getExprParser()->doExpression( $expr );
+ global $wgContLang;
+
+ $ans = self::getExprParser()->doExpression( $wgContLang->parseFormattedNumber( $expr ) );
+ return $wgContLang->formatNum( $ans, true );
} catch ( ExprError $e ) {
return $e->getMessage();
}
@@ -437,7 +440,9 @@
$cacheKey = $parser->getOptions()->getTimestamp();
$date = wfTimestamp( TS_ISO_8601, $cacheKey );
} else {
- $cacheKey = $date;
+ global $wgContLang;
+
+ $date = $cacheKey = $wgContLang->parseFormattedNumber( $date );
}
if ( isset( self::$mTimeCache[$format][$cacheKey][$language][$local] ) ) {
return self::$mTimeCache[$format][$cacheKey][$language][$local];

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8360
Default Alt Text
ParserFunctions.diff (977 B)

Event Timeline