Index: trunk/extensions/ParserFunctions/ParserFunctions_body.php |
— | — | @@ -505,14 +505,11 @@ |
506 | 506 | return '<strong class="error">' . wfMsgForContent( 'pfunc_time_too_long' ) . '</strong>'; |
507 | 507 | } else { |
508 | 508 | if ( $ts < 100000000000000 ) { // Language can't deal with years after 9999 |
509 | | - if ( $language == 'user' ) { // use user's interface language |
510 | | - $parser->getOptions()->getUserLang(); |
511 | | - $result = $wgLang->sprintfDate( $format, $ts ); |
512 | | - } elseif ( $language !== '' ) { // use whatever language is passed as a parameter |
| 509 | + if ( $language !== '' ) { // use whatever language is passed as a parameter |
513 | 510 | $langObject = Language::factory( $language ); |
514 | 511 | $result = $langObject->sprintfDate( $format, $ts ); |
515 | 512 | } else { // use wiki's content language |
516 | | - $result = $wgContLang->sprintfDate( $format, $ts ); |
| 513 | + $result = $parser->getFunctionLang()->sprintfDate( $format, $ts ); |
517 | 514 | } |
518 | 515 | } else { |
519 | 516 | return '<strong class="error">' . wfMsgForContent( 'pfunc_time_too_big' ) . '</strong>'; |