$this->logFeatureUsage( 'action=expandtemplates&generatexml' );
}
- $wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS );
+ $wgParser->startExternalParse( $title_obj, $options, Parser::OT_PREPROCESS );
$dom = $wgParser->preprocessToDom( $params['text'] );
if ( is_callable( array( $dom, 'saveXML' ) ) ) {
$xml = $dom->saveXML();
// if they didn't want any output except (probably) the parse tree,
// then don't bother actually fully expanding it
if ( $prop || $params['prop'] === null ) {
- $wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS );
+ $wgParser->startExternalParse( $title_obj, $options, Parser::OT_PREPROCESS );
$frame = $wgParser->getPreprocessor()->newFrame();
$wikitext = $wgParser->preprocess( $params['text'], $title_obj, $options, null, $frame );
if ( $params['prop'] === null ) {
$this->dieUsage( "generatexml is only supported for wikitext content", "notwikitext" );
}
- $wgParser->startExternalParse( $titleObj, $popts, OT_PREPROCESS );
+ $wgParser->startExternalParse( $titleObj, $popts, Parser::OT_PREPROCESS );
$dom = $wgParser->preprocessToDom( $this->content->getNativeData() );
if ( is_callable( array( $dom, 'saveXML' ) ) ) {
$xml = $dom->saveXML();
$wgParser->startExternalParse(
$title,
ParserOptions::newFromContext( $this->getContext() ),
- OT_PREPROCESS
+ Parser::OT_PREPROCESS
);
$dom = $wgParser->preprocessToDom( $t );
if ( is_callable( array( $dom, 'saveXML' ) ) ) {
$options->setMaxIncludeSize( self::MAX_INCLUDE_SIZE );
if ( $this->generateXML ) {
- $wgParser->startExternalParse( $title, $options, OT_PREPROCESS );
+ $wgParser->startExternalParse( $title, $options, Parser::OT_PREPROCESS );
$dom = $wgParser->preprocessToDom( $input );
if ( method_exists( $dom, 'saveXML' ) ) {