Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -462,7 +462,7 @@ |
463 | 463 | } |
464 | 464 | if ( $this->fld_content && !$revision->isDeleted( Revision::DELETED_TEXT ) ) { |
465 | 465 | if ( $this->generateXML ) { |
466 | | - $wgParser->startExternalParse( $title, new ParserOptions(), OT_PREPROCESS ); |
| 466 | + $wgParser->startExternalParse( $title, ParserOptions::newFromContext( $this->getContext() ), OT_PREPROCESS ); |
467 | 467 | $dom = $wgParser->preprocessToDom( $text ); |
468 | 468 | if ( is_callable( array( $dom, 'saveXML' ) ) ) { |
469 | 469 | $xml = $dom->saveXML(); |
— | — | @@ -473,10 +473,10 @@ |
474 | 474 | |
475 | 475 | } |
476 | 476 | if ( $this->expandTemplates && !$this->parseContent ) { |
477 | | - $text = $wgParser->preprocess( $text, $title, new ParserOptions() ); |
| 477 | + $text = $wgParser->preprocess( $text, $title, ParserOptions::newFromContext( $this->getContext() ) ); |
478 | 478 | } |
479 | 479 | if ( $this->parseContent ) { |
480 | | - $text = $wgParser->parse( $text, $title, new ParserOptions() )->getText(); |
| 480 | + $text = $wgParser->parse( $text, $title, ParserOptions::newFromContext( $this->getContext() ) )->getText(); |
481 | 481 | } |
482 | 482 | ApiResult::setContent( $vals, $text ); |
483 | 483 | } elseif ( $this->fld_content ) { |