public function getParserOutput( $oldid = null, User $user = null ) {
//XXX: bypasses mParserOptions and thus setParserOptions()
- $user = is_null( $user ) ? $this->getContext()->getUser() : $user;
- $parserOptions = $this->mPage->makeParserOptions( $user );
+ if ( $user === null ) {
+ $parserOptions = $this->getParserOptions();
+ } else {
+ $parserOptions = $this->mPage->makeParserOptions( $user );
+ }
return $this->mPage->getParserOutput( $parserOptions, $oldid );
}
*/
public function getParserOptions() {
if ( !$this->mParserOptions ) {
- $this->mParserOptions = $this->mPage->makeParserOptions( $this->getContext()->getUser() );
+ $this->mParserOptions = $this->mPage->makeParserOptions( $this->getContext() );
}
// Clone to allow modifications of the return value without affecting cache
return clone $this->mParserOptions;