X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiExpandTemplates.php;h=eea10e9b83414e71b2e0406749285665c95a4a85;hb=a56c35a226fea3a3548a0313ce8fb748cfeb3d5a;hp=93903b52a5b3f54fc6803c2d1e8d597918a7ff0d;hpb=30cc068774d9de3af900af70d00126f9be721773;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php index 93903b52a5..eea10e9b83 100644 --- a/includes/api/ApiExpandTemplates.php +++ b/includes/api/ApiExpandTemplates.php @@ -75,7 +75,7 @@ class ApiExpandTemplates extends ApiBase { $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(); @@ -96,7 +96,7 @@ class ApiExpandTemplates extends ApiBase { // 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 ) { @@ -159,7 +159,7 @@ class ApiExpandTemplates extends ApiBase { ); } - public function getExamplesMessages() { + protected function getExamplesMessages() { return array( 'action=expandtemplates&text={{Project:Sandbox}}' => 'apihelp-expandtemplates-example-simple',