From 4b4a0655013f0b8de871f1572d3f1db751e0b347 Mon Sep 17 00:00:00 2001 From: Ryan Kaldari Date: Wed, 29 Sep 2010 17:25:17 +0000 Subject: [PATCH] fixing per comments at r70517 --- includes/parser/CoreParserFunctions.php | 2 +- includes/parser/ParserOptions.php | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index f35d020d88..f28b92d614 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -86,7 +86,7 @@ class CoreParserFunctions { static function intFunction( $parser, $part1 = '' /*, ... */ ) { if ( strval( $part1 ) !== '' ) { $args = array_slice( func_get_args(), 2 ); - $message = wfMsgGetKey( $part1, true, $parser->mOptions->getUserLang(), false ); + $message = wfMsgGetKey( $part1, true, $parser->getOptions()->getUserLang(), false ); $message = wfMsgReplaceArgs( $message, $args ); $message = $parser->replaceVariables( $message ); // like $wgMessageCache->transform() return $message; diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index 975863985f..dcd0bad669 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -103,9 +103,11 @@ class ParserOptions { return $this->mTimestamp; } - # You shouldn't use this. Really. $parser->getFunctionLang() is all you need. - # Using this fragments the cache and is discouraged. Yes, {{int: }} uses this, - # producing inconsistent tables (Bug 14404). + /** + * You shouldn't use this. Really. $parser->getFunctionLang() is all you need. + * Using this fragments the cache and is discouraged. Yes, {{int: }} uses this, + * producing inconsistent tables (Bug 14404). + */ function getUserLang() { $this->accessedOptions['userlang'] = true; return $this->mUserLang; -- 2.20.1