Merge "Align "What's this" vertically"
[lhc/web/wiklou.git] / includes / api / ApiQueryRevisionsBase.php
index 696ec87..2ffd024 100644 (file)
@@ -104,6 +104,17 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
                $this->fld_tags = isset( $prop['tags'] );
                $this->fld_parsetree = isset( $prop['parsetree'] );
 
+               if ( $this->fld_parsetree ) {
+                       $encParam = $this->encodeParamName( 'prop' );
+                       $name = $this->getModuleName();
+                       $parent = $this->getParent();
+                       $parentParam = $parent->encodeParamName( $parent->getModuleManager()->getModuleGroup( $name ) );
+                       $this->addDeprecation(
+                               [ 'apiwarn-deprecation-parameter', "{$encParam}=parsetree" ],
+                               "action=query&{$parentParam}={$name}&{$encParam}=parsetree"
+                       );
+               }
+
                if ( !empty( $params['contentformat'] ) ) {
                        $this->contentFormat = $params['contentformat'];
                }
@@ -477,6 +488,7 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
                        'expandtemplates' => [
                                ApiBase::PARAM_DFLT => false,
                                ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-expandtemplates',
+                               ApiBase::PARAM_DEPRECATED => true,
                        ],
                        'generatexml' => [
                                ApiBase::PARAM_DFLT => false,
@@ -486,19 +498,23 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
                        'parse' => [
                                ApiBase::PARAM_DFLT => false,
                                ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-parse',
+                               ApiBase::PARAM_DEPRECATED => true,
                        ],
                        'section' => [
                                ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-section',
                        ],
                        'diffto' => [
                                ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-diffto',
+                               ApiBase::PARAM_DEPRECATED => true,
                        ],
                        'difftotext' => [
                                ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotext',
+                               ApiBase::PARAM_DEPRECATED => true,
                        ],
                        'difftotextpst' => [
                                ApiBase::PARAM_DFLT => false,
                                ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotextpst',
+                               ApiBase::PARAM_DEPRECATED => true,
                        ],
                        'contentformat' => [
                                ApiBase::PARAM_TYPE => ContentHandler::getAllContentFormats(),