From: Platonides Date: Fri, 15 Oct 2010 23:10:05 +0000 (+0000) Subject: Use the accessor for getting mOptions. X-Git-Tag: 1.31.0-rc.0~34486 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=ed779ae90a31bbd752a244a3f95172b7556ce848;p=lhc%2Fweb%2Fwiklou.git Use the accessor for getting mOptions. I'm not touching the accesses from the preprocessors since I don't know if the call could add a penalty. --- diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index d147a62b4a..bf36ea7176 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -101,7 +101,7 @@ class CoreParserFunctions { $date = trim( $date ); - $pref = $parser->mOptions->getDateFormat(); + $pref = $parser->getOptions()->getDateFormat(); // Specify a different default date format other than the the normal default // iff the user has 'default' for their setting @@ -250,7 +250,7 @@ class CoreParserFunctions { $user = User::newFromName( $user ); if ( $user ) { $gender = $user->getOption( 'gender' ); - } elseif ( $parser->mOptions->getInterfaceMessage() ) { + } elseif ( $parser->getOptions()->getInterfaceMessage() ) { global $wgUser; $gender = $wgUser->getOption( 'gender' ); } diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php index e028675a97..33f3c824e5 100644 --- a/includes/parser/CoreTagHooks.php +++ b/includes/parser/CoreTagHooks.php @@ -49,7 +49,7 @@ class CoreTagHooks { static function math( $content, $attributes, $parser ) { global $wgContLang; - return $wgContLang->armourMath( MathRenderer::renderMath( $content, $attributes, $parser->mOptions ) ); + return $wgContLang->armourMath( MathRenderer::renderMath( $content, $attributes, $parser->getOptions() ) ); } static function gallery( $content, $attributes, $parser ) {