$parserCache = ParserCache::singleton();
- $parserOptions = $this->mPage->getParserOptions();
+ $parserOptions = $this->getParserOptions();
# Render printable version, use printable version cache
if ( $wgOut->isPrintable() ) {
$parserOptions->setIsPrintable( true );
global $wgOut;
$oldid = $this->getOldID();
- $parserOptions = $this->mPage->getParserOptions();
+ $parserOptions = $this->getParserOptions();
# Render printable version, use printable version cache
$parserOptions->setIsPrintable( $wgOut->isPrintable() );
public function tryDirtyCache() {
global $wgOut;
$parserCache = ParserCache::singleton();
- $options = $this->mPage->getParserOptions();
+ $options = $this->getParserOptions();
if ( $wgOut->isPrintable() ) {
$options->setIsPrintable( true );
global $wgParser, $wgEnableParserCache, $wgUseFileCache;
if ( !$parserOptions ) {
- $parserOptions = $this->mPage->getParserOptions();
+ $parserOptions = $this->getParserOptions();
}
$time = - wfTime();
return $this->mParserOutput;
}
+ /**
+ * Get parser options suitable for rendering the primary article wikitext
+ * @return mixed ParserOptions object or boolean false
+ */
+ public function getParserOptions() {
+ global $wgUser;
+ if ( !$this->mParserOptions ) {
+ $this->mParserOptions = $this->mPage->makeParserOptions( $wgUser );
+ }
+ // Clone to allow modifications of the return value without affecting cache
+ return clone $this->mParserOptions;
+ }
+
/**
* Sets the context this Article is executed in
*
return $reason;
}
- /**
- * Get parser options suitable for rendering the primary article wikitext
- * @return mixed ParserOptions object or boolean false
- */
- public function getParserOptions() {
- global $wgUser;
- if ( !$this->mParserOptions ) {
- $this->mParserOptions = $this->makeParserOptions( $wgUser );
- }
- // Clone to allow modifications of the return value without affecting cache
- return clone $this->mParserOptions;
- }
-
/**
* Get parser options suitable for rendering the primary article wikitext
* @param User|string $user User object or 'canonical'