Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/168636

Change subject: Use Parser::OT_PREPROCESS class const
......................................................................

Use Parser::OT_PREPROCESS class const

Instead of the global const

Change-Id: Ica9a3fdd0a48bb3c71ebb2b84933149a9f275fac
---
M includes/api/ApiExpandTemplates.php
M includes/api/ApiParse.php
M includes/api/ApiQueryRevisions.php
M includes/specials/SpecialExpandTemplates.php
4 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/168636/1

diff --git a/includes/api/ApiExpandTemplates.php 
b/includes/api/ApiExpandTemplates.php
index 93903b5..6e49d3c 100644
--- a/includes/api/ApiExpandTemplates.php
+++ b/includes/api/ApiExpandTemplates.php
@@ -75,7 +75,7 @@
                                $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 @@
                // 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 ) {
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index d25c87a..007c620 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -376,7 +376,7 @@
                                $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();
diff --git a/includes/api/ApiQueryRevisions.php 
b/includes/api/ApiQueryRevisions.php
index d547929..27050ce 100644
--- a/includes/api/ApiQueryRevisions.php
+++ b/includes/api/ApiQueryRevisions.php
@@ -558,7 +558,7 @@
                                        $wgParser->startExternalParse(
                                                $title,
                                                ParserOptions::newFromContext( 
$this->getContext() ),
-                                               OT_PREPROCESS
+                                               Parser::OT_PREPROCESS
                                        );
                                        $dom = $wgParser->preprocessToDom( $t );
                                        if ( is_callable( array( $dom, 
'saveXML' ) ) ) {
diff --git a/includes/specials/SpecialExpandTemplates.php 
b/includes/specials/SpecialExpandTemplates.php
index f3adeba..aab9c3e 100644
--- a/includes/specials/SpecialExpandTemplates.php
+++ b/includes/specials/SpecialExpandTemplates.php
@@ -77,7 +77,7 @@
                        $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' ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/168636
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica9a3fdd0a48bb3c71ebb2b84933149a9f275fac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to