3 * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
23 use MediaWiki\Logger\LoggerFactory
;
24 use MediaWiki\Revision\RevisionAccessException
;
25 use MediaWiki\Revision\RevisionRecord
;
26 use MediaWiki\Revision\SlotRecord
;
27 use MediaWiki\MediaWikiServices
;
30 * A base class for functions common to producing a list of revisions.
34 abstract class ApiQueryRevisionsBase
extends ApiQueryGeneratorBase
{
37 * @name Constants for internal use. Don't use externally.
41 // Bits to indicate the results of the revdel permission check on a revision,
42 // see self::checkRevDel()
43 const IS_DELETED
= 1; // Whether the field is revision-deleted
44 const CANNOT_VIEW
= 2; // Whether the user cannot view the field due to revdel
48 protected $limit, $diffto, $difftotext, $difftotextpst, $expandTemplates, $generateXML,
49 $section, $parseContent, $fetchContent, $contentFormat, $setParsedLimit = true,
50 $slotRoles = null, $needSlots;
52 protected $fld_ids = false, $fld_flags = false, $fld_timestamp = false,
53 $fld_size = false, $fld_slotsize = false, $fld_sha1 = false, $fld_slotsha1 = false,
54 $fld_comment = false, $fld_parsedcomment = false, $fld_user = false, $fld_userid = false,
55 $fld_content = false, $fld_tags = false, $fld_contentmodel = false, $fld_roles = false,
56 $fld_parsetree = false;
58 public function execute() {
62 public function executeGenerator( $resultPageSet ) {
63 $this->run( $resultPageSet );
67 * @param ApiPageSet|null $resultPageSet
70 abstract protected function run( ApiPageSet
$resultPageSet = null );
73 * Parse the parameters into the various instance fields.
75 * @param array $params
77 protected function parseParameters( $params ) {
78 $prop = array_flip( $params['prop'] );
80 $this->fld_ids
= isset( $prop['ids'] );
81 $this->fld_flags
= isset( $prop['flags'] );
82 $this->fld_timestamp
= isset( $prop['timestamp'] );
83 $this->fld_comment
= isset( $prop['comment'] );
84 $this->fld_parsedcomment
= isset( $prop['parsedcomment'] );
85 $this->fld_size
= isset( $prop['size'] );
86 $this->fld_slotsize
= isset( $prop['slotsize'] );
87 $this->fld_sha1
= isset( $prop['sha1'] );
88 $this->fld_slotsha1
= isset( $prop['slotsha1'] );
89 $this->fld_content
= isset( $prop['content'] );
90 $this->fld_contentmodel
= isset( $prop['contentmodel'] );
91 $this->fld_userid
= isset( $prop['userid'] );
92 $this->fld_user
= isset( $prop['user'] );
93 $this->fld_tags
= isset( $prop['tags'] );
94 $this->fld_roles
= isset( $prop['roles'] );
95 $this->fld_parsetree
= isset( $prop['parsetree'] );
97 $this->slotRoles
= $params['slots'];
99 if ( $this->slotRoles
!== null ) {
100 if ( $this->fld_parsetree
) {
101 $this->dieWithError( [
102 'apierror-invalidparammix-cannotusewith',
103 $this->encodeParamName( 'prop=parsetree' ),
104 $this->encodeParamName( 'slots' ),
105 ], 'invalidparammix' );
108 'expandtemplates', 'generatexml', 'parse', 'diffto', 'difftotext', 'difftotextpst',
111 if ( $params[$p] !== null && $params[$p] !== false ) {
112 $this->dieWithError( [
113 'apierror-invalidparammix-cannotusewith',
114 $this->encodeParamName( $p ),
115 $this->encodeParamName( 'slots' ),
116 ], 'invalidparammix' );
121 if ( !empty( $params['contentformat'] ) ) {
122 $this->contentFormat
= $params['contentformat'];
125 $this->limit
= $params['limit'];
127 if ( !is_null( $params['difftotext'] ) ) {
128 $this->difftotext
= $params['difftotext'];
129 $this->difftotextpst
= $params['difftotextpst'];
130 } elseif ( !is_null( $params['diffto'] ) ) {
131 if ( $params['diffto'] == 'cur' ) {
132 $params['diffto'] = 0;
134 if ( ( !ctype_digit( $params['diffto'] ) ||
$params['diffto'] < 0 )
135 && $params['diffto'] != 'prev' && $params['diffto'] != 'next'
137 $p = $this->getModulePrefix();
138 $this->dieWithError( [ 'apierror-baddiffto', $p ], 'diffto' );
140 // Check whether the revision exists and is readable,
141 // DifferenceEngine returns a rather ambiguous empty
142 // string if that's not the case
143 if ( $params['diffto'] != 0 ) {
144 $difftoRev = MediaWikiServices
::getInstance()->getRevisionStore()
145 ->getRevisionById( $params['diffto'] );
147 $this->dieWithError( [ 'apierror-nosuchrevid', $params['diffto'] ] );
149 $revDel = $this->checkRevDel( $difftoRev, RevisionRecord
::DELETED_TEXT
);
150 if ( $revDel & self
::CANNOT_VIEW
) {
151 $this->addWarning( [ 'apiwarn-difftohidden', $difftoRev->getId() ] );
152 $params['diffto'] = null;
155 $this->diffto
= $params['diffto'];
158 $this->fetchContent
= $this->fld_content ||
!is_null( $this->diffto
)
159 ||
!is_null( $this->difftotext
) ||
$this->fld_parsetree
;
162 if ( $this->fetchContent
) {
164 $this->expandTemplates
= $params['expandtemplates'];
165 $this->generateXML
= $params['generatexml'];
166 $this->parseContent
= $params['parse'];
167 if ( $this->parseContent
) {
168 // Must manually initialize unset limit
169 if ( is_null( $this->limit
) ) {
173 $this->section
= $params['section'] ??
false;
176 $userMax = $this->parseContent ?
1 : ( $smallLimit ? ApiBase
::LIMIT_SML1
: ApiBase
::LIMIT_BIG1
);
177 $botMax = $this->parseContent ?
1 : ( $smallLimit ? ApiBase
::LIMIT_SML2
: ApiBase
::LIMIT_BIG2
);
178 if ( $this->limit
== 'max' ) {
179 $this->limit
= $this->getMain()->canApiHighLimits() ?
$botMax : $userMax;
180 if ( $this->setParsedLimit
) {
181 $this->getResult()->addParsedLimit( $this->getModuleName(), $this->limit
);
185 if ( is_null( $this->limit
) ) {
188 $this->validateLimit( 'limit', $this->limit
, 1, $userMax, $botMax );
190 $this->needSlots
= $this->fetchContent ||
$this->fld_contentmodel ||
191 $this->fld_slotsize ||
$this->fld_slotsha1
;
192 if ( $this->needSlots
&& $this->slotRoles
=== null ) {
193 $encParam = $this->encodeParamName( 'slots' );
194 $name = $this->getModuleName();
195 $parent = $this->getParent();
196 $parentParam = $parent->encodeParamName( $parent->getModuleManager()->getModuleGroup( $name ) );
197 $this->addDeprecation(
198 [ 'apiwarn-deprecation-missingparam', $encParam ],
199 "action=query&{$parentParam}={$name}&!{$encParam}"
205 * Test revision deletion status
206 * @param RevisionRecord $revision Revision to check
207 * @param int $field One of the RevisionRecord::DELETED_* constants
208 * @return int Revision deletion status flags. Bitwise OR of
209 * self::IS_DELETED and self::CANNOT_VIEW, as appropriate.
211 private function checkRevDel( RevisionRecord
$revision, $field ) {
212 $ret = $revision->isDeleted( $field ) ? self
::IS_DELETED
: 0;
214 $canSee = $revision->audienceCan( $field, RevisionRecord
::FOR_THIS_USER
, $this->getUser() );
215 $ret = $ret |
( $canSee ?
0 : self
::CANNOT_VIEW
);
221 * Extract information from the RevisionRecord
223 * @since 1.32, takes a RevisionRecord instead of a Revision
224 * @param RevisionRecord $revision Revision
225 * @param object $row Should have a field 'ts_tags' if $this->fld_tags is set
228 protected function extractRevisionInfo( RevisionRecord
$revision, $row ) {
232 if ( $this->fld_ids
) {
233 $vals['revid'] = (int)$revision->getId();
234 if ( !is_null( $revision->getParentId() ) ) {
235 $vals['parentid'] = (int)$revision->getParentId();
239 if ( $this->fld_flags
) {
240 $vals['minor'] = $revision->isMinor();
243 if ( $this->fld_user ||
$this->fld_userid
) {
244 $revDel = $this->checkRevDel( $revision, RevisionRecord
::DELETED_USER
);
245 if ( ( $revDel & self
::IS_DELETED
) ) {
246 $vals['userhidden'] = true;
249 if ( !( $revDel & self
::CANNOT_VIEW
) ) {
250 $u = $revision->getUser( RevisionRecord
::RAW
);
251 if ( $this->fld_user
) {
252 $vals['user'] = $u->getName();
254 $userid = $u->getId();
256 $vals['anon'] = true;
259 if ( $this->fld_userid
) {
260 $vals['userid'] = $userid;
265 if ( $this->fld_timestamp
) {
266 $vals['timestamp'] = wfTimestamp( TS_ISO_8601
, $revision->getTimestamp() );
269 if ( $this->fld_size
) {
271 $vals['size'] = (int)$revision->getSize();
272 } catch ( RevisionAccessException
$e ) {
273 // Back compat: If there's no size, return 0.
274 // @todo: Gergő says to mention T198099 as a "todo" here.
279 if ( $this->fld_sha1
) {
280 $revDel = $this->checkRevDel( $revision, RevisionRecord
::DELETED_TEXT
);
281 if ( ( $revDel & self
::IS_DELETED
) ) {
282 $vals['sha1hidden'] = true;
285 if ( !( $revDel & self
::CANNOT_VIEW
) ) {
287 $vals['sha1'] = Wikimedia\base_convert
( $revision->getSha1(), 36, 16, 40 );
288 } catch ( RevisionAccessException
$e ) {
289 // Back compat: If there's no sha1, return emtpy string.
290 // @todo: Gergő says to mention T198099 as a "todo" here.
297 if ( $this->fld_roles
) {
298 $vals['roles'] = $revision->getSlotRoles();
301 if ( $this->needSlots
) {
302 $revDel = $this->checkRevDel( $revision, RevisionRecord
::DELETED_TEXT
);
303 if ( ( $this->fld_slotsha1 ||
$this->fetchContent
) && ( $revDel & self
::IS_DELETED
) ) {
306 $vals = array_merge( $vals, $this->extractAllSlotInfo( $revision, $revDel ) );
308 } catch ( RevisionAccessException
$ex ) {
309 // This is here so T212428 doesn't spam the log.
310 // TODO: find out why T212428 happens in the first place!
311 $vals['slotsmissing'] = true;
313 LoggerFactory
::getInstance( 'api-warning' )->error(
314 'Failed to access revision slots',
315 [ 'revision' => $revision->getId(), 'exception' => $ex, ]
319 if ( $this->fld_comment ||
$this->fld_parsedcomment
) {
320 $revDel = $this->checkRevDel( $revision, RevisionRecord
::DELETED_COMMENT
);
321 if ( ( $revDel & self
::IS_DELETED
) ) {
322 $vals['commenthidden'] = true;
325 if ( !( $revDel & self
::CANNOT_VIEW
) ) {
326 $comment = $revision->getComment( RevisionRecord
::RAW
);
327 $comment = $comment ?
$comment->text
: '';
329 if ( $this->fld_comment
) {
330 $vals['comment'] = $comment;
333 if ( $this->fld_parsedcomment
) {
334 $vals['parsedcomment'] = Linker
::formatComment(
335 $comment, Title
::newFromLinkTarget( $revision->getPageAsLinkTarget() )
341 if ( $this->fld_tags
) {
342 if ( $row->ts_tags
) {
343 $tags = explode( ',', $row->ts_tags
);
344 ApiResult
::setIndexedTagName( $tags, 'tag' );
345 $vals['tags'] = $tags;
351 if ( $anyHidden && $revision->isDeleted( RevisionRecord
::DELETED_RESTRICTED
) ) {
352 $vals['suppressed'] = true;
359 * Extracts information about all relevant slots.
361 * @param RevisionRecord $revision
365 * @throws ApiUsageException
367 private function extractAllSlotInfo( RevisionRecord
$revision, $revDel ): array {
370 if ( $this->slotRoles
=== null ) {
372 $slot = $revision->getSlot( SlotRecord
::MAIN
, RevisionRecord
::RAW
);
373 } catch ( RevisionAccessException
$e ) {
374 // Back compat: If there's no slot, there's no content, so set 'textmissing'
375 // @todo: Gergő says to mention T198099 as a "todo" here.
376 $vals['textmissing'] = true;
382 $vals +
= $this->extractSlotInfo( $slot, $revDel, $content );
383 if ( !empty( $vals['nosuchsection'] ) ) {
386 'apierror-nosuchsection-what',
387 wfEscapeWikiText( $this->section
),
388 $this->msg( 'revid', $revision->getId() )
394 $vals +
= $this->extractDeprecatedContent( $content, $revision );
398 $roles = array_intersect( $this->slotRoles
, $revision->getSlotRoles() );
400 ApiResult
::META_KVP_MERGE
=> true,
402 foreach ( $roles as $role ) {
404 $slot = $revision->getSlot( $role, RevisionRecord
::RAW
);
405 } catch ( RevisionAccessException
$e ) {
406 // Don't error out here so the client can still process other slots/revisions.
407 // @todo: Gergő says to mention T198099 as a "todo" here.
408 $vals['slots'][$role]['missing'] = true;
412 $vals['slots'][$role] = $this->extractSlotInfo( $slot, $revDel, $content );
413 // @todo Move this into extractSlotInfo() (and remove its $content parameter)
414 // when extractDeprecatedContent() is no more.
416 $vals['slots'][$role]['contentmodel'] = $content->getModel();
417 $vals['slots'][$role]['contentformat'] = $content->getDefaultFormat();
418 ApiResult
::setContentValue(
419 $vals['slots'][$role],
421 $content->serialize()
425 ApiResult
::setArrayType( $vals['slots'], 'kvp', 'role' );
426 ApiResult
::setIndexedTagName( $vals['slots'], 'slot' );
432 * Extract information from the SlotRecord
434 * @param SlotRecord $slot
435 * @param int $revDel Revdel status flags, from self::checkRevDel()
436 * @param Content|null &$content Set to the slot's content, if available
437 * and $this->fetchContent is true
440 private function extractSlotInfo( SlotRecord
$slot, $revDel, &$content = null ) {
442 ApiResult
::setArrayType( $vals, 'assoc' );
444 if ( $this->fld_slotsize
) {
445 $vals['size'] = (int)$slot->getSize();
448 if ( $this->fld_slotsha1
) {
449 if ( ( $revDel & self
::IS_DELETED
) ) {
450 $vals['sha1hidden'] = true;
452 if ( !( $revDel & self
::CANNOT_VIEW
) ) {
453 if ( $slot->getSha1() != '' ) {
454 $vals['sha1'] = Wikimedia\base_convert
( $slot->getSha1(), 36, 16, 40 );
461 if ( $this->fld_contentmodel
) {
462 $vals['contentmodel'] = $slot->getModel();
466 if ( $this->fetchContent
) {
467 if ( ( $revDel & self
::IS_DELETED
) ) {
468 $vals['texthidden'] = true;
470 if ( !( $revDel & self
::CANNOT_VIEW
) ) {
472 $content = $slot->getContent();
473 } catch ( RevisionAccessException
$e ) {
474 // @todo: Gergő says to mention T198099 as a "todo" here.
475 $vals['textmissing'] = true;
477 // Expand templates after getting section content because
478 // template-added sections don't count and Parser::preprocess()
479 // will have less input
480 if ( $content && $this->section
!== false ) {
481 $content = $content->getSection( $this->section
, false );
483 $vals['nosuchsection'] = true;
493 * Format a Content using deprecated options
494 * @param Content $content Content to format
495 * @param RevisionRecord $revision Revision being processed
498 private function extractDeprecatedContent( Content
$content, RevisionRecord
$revision ) {
500 $title = Title
::newFromLinkTarget( $revision->getPageAsLinkTarget() );
502 if ( $this->fld_parsetree ||
( $this->fld_content
&& $this->generateXML
) ) {
503 if ( $content->getModel() === CONTENT_MODEL_WIKITEXT
) {
504 /** @var WikitextContent $content */
505 '@phan-var WikitextContent $content';
506 $t = $content->getText(); # note: don't set $text
508 $parser = MediaWikiServices
::getInstance()->getParser();
509 $parser->startExternalParse(
511 ParserOptions
::newFromContext( $this->getContext() ),
512 Parser
::OT_PREPROCESS
514 $dom = $parser->preprocessToDom( $t );
515 if ( is_callable( [ $dom, 'saveXML' ] ) ) {
516 // @phan-suppress-next-line PhanUndeclaredMethod
517 $xml = $dom->saveXML();
519 // @phan-suppress-next-line PhanUndeclaredMethod
520 $xml = $dom->__toString();
522 $vals['parsetree'] = $xml;
524 $vals['badcontentformatforparsetree'] = true;
527 'apierror-parsetree-notwikitext-title',
528 wfEscapeWikiText( $title->getPrefixedText() ),
531 'parsetree-notwikitext'
536 if ( $this->fld_content
) {
539 if ( $this->expandTemplates
&& !$this->parseContent
) {
540 if ( $content->getModel() === CONTENT_MODEL_WIKITEXT
) {
541 /** @var WikitextContent $content */
542 '@phan-var WikitextContent $content';
543 $text = $content->getText();
545 $text = MediaWikiServices
::getInstance()->getParser()->preprocess(
548 ParserOptions
::newFromContext( $this->getContext() )
552 'apierror-templateexpansion-notwikitext',
553 wfEscapeWikiText( $title->getPrefixedText() ),
556 $vals['badcontentformat'] = true;
560 if ( $this->parseContent
) {
561 $po = $content->getParserOutput(
564 ParserOptions
::newFromContext( $this->getContext() )
566 $text = $po->getText();
569 if ( $text === null ) {
570 $format = $this->contentFormat ?
: $content->getDefaultFormat();
571 $model = $content->getModel();
573 if ( !$content->isSupportedFormat( $format ) ) {
574 $name = wfEscapeWikiText( $title->getPrefixedText() );
575 $this->addWarning( [ 'apierror-badformat', $this->contentFormat
, $model, $name ] );
576 $vals['badcontentformat'] = true;
579 $text = $content->serialize( $format );
580 // always include format and model.
581 // Format is needed to deserialize, model is needed to interpret.
582 $vals['contentformat'] = $format;
583 $vals['contentmodel'] = $model;
587 if ( $text !== false ) {
588 ApiResult
::setContentValue( $vals, 'content', $text );
592 if ( $content && ( !is_null( $this->diffto
) ||
!is_null( $this->difftotext
) ) ) {
593 static $n = 0; // Number of uncached diffs we've had
595 if ( $n < $this->getConfig()->get( 'APIMaxUncachedDiffs' ) ) {
597 $context = new DerivativeContext( $this->getContext() );
598 $context->setTitle( $title );
599 $handler = $content->getContentHandler();
601 if ( !is_null( $this->difftotext
) ) {
602 $model = $title->getContentModel();
604 if ( $this->contentFormat
605 && !ContentHandler
::getForModelID( $model )->isSupportedFormat( $this->contentFormat
)
607 $name = wfEscapeWikiText( $title->getPrefixedText() );
608 $this->addWarning( [ 'apierror-badformat', $this->contentFormat
, $model, $name ] );
609 $vals['diff']['badcontentformat'] = true;
612 $difftocontent = ContentHandler
::makeContent(
619 if ( $this->difftotextpst
) {
620 $popts = ParserOptions
::newFromContext( $this->getContext() );
621 $difftocontent = $difftocontent->preSaveTransform( $title, $this->getUser(), $popts );
624 $engine = $handler->createDifferenceEngine( $context );
625 $engine->setContent( $content, $difftocontent );
628 $engine = $handler->createDifferenceEngine( $context, $revision->getId(), $this->diffto
);
629 $vals['diff']['from'] = $engine->getOldid();
630 $vals['diff']['to'] = $engine->getNewid();
633 $difftext = $engine->getDiffBody();
634 ApiResult
::setContentValue( $vals['diff'], 'body', $difftext );
635 if ( !$engine->wasCacheHit() ) {
640 $vals['diff']['notcached'] = true;
647 public function getCacheMode( $params ) {
648 if ( $this->userCanSeeRevDel() ) {
655 public function getAllowedParams() {
656 $slotRoles = MediaWikiServices
::getInstance()->getSlotRoleRegistry()->getKnownRoles();
657 sort( $slotRoles, SORT_STRING
);
661 ApiBase
::PARAM_ISMULTI
=> true,
662 ApiBase
::PARAM_DFLT
=> 'ids|timestamp|flags|comment|user',
663 ApiBase
::PARAM_TYPE
=> [
681 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-prop',
682 ApiBase
::PARAM_HELP_MSG_PER_VALUE
=> [
683 'ids' => 'apihelp-query+revisions+base-paramvalue-prop-ids',
684 'flags' => 'apihelp-query+revisions+base-paramvalue-prop-flags',
685 'timestamp' => 'apihelp-query+revisions+base-paramvalue-prop-timestamp',
686 'user' => 'apihelp-query+revisions+base-paramvalue-prop-user',
687 'userid' => 'apihelp-query+revisions+base-paramvalue-prop-userid',
688 'size' => 'apihelp-query+revisions+base-paramvalue-prop-size',
689 'slotsize' => 'apihelp-query+revisions+base-paramvalue-prop-slotsize',
690 'sha1' => 'apihelp-query+revisions+base-paramvalue-prop-sha1',
691 'slotsha1' => 'apihelp-query+revisions+base-paramvalue-prop-slotsha1',
692 'contentmodel' => 'apihelp-query+revisions+base-paramvalue-prop-contentmodel',
693 'comment' => 'apihelp-query+revisions+base-paramvalue-prop-comment',
694 'parsedcomment' => 'apihelp-query+revisions+base-paramvalue-prop-parsedcomment',
695 'content' => 'apihelp-query+revisions+base-paramvalue-prop-content',
696 'tags' => 'apihelp-query+revisions+base-paramvalue-prop-tags',
697 'roles' => 'apihelp-query+revisions+base-paramvalue-prop-roles',
698 'parsetree' => [ 'apihelp-query+revisions+base-paramvalue-prop-parsetree',
699 CONTENT_MODEL_WIKITEXT
],
701 ApiBase
::PARAM_DEPRECATED_VALUES
=> [
706 ApiBase
::PARAM_TYPE
=> $slotRoles,
707 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-slots',
708 ApiBase
::PARAM_ISMULTI
=> true,
709 ApiBase
::PARAM_ALL
=> true,
712 ApiBase
::PARAM_TYPE
=> 'limit',
713 ApiBase
::PARAM_MIN
=> 1,
714 ApiBase
::PARAM_MAX
=> ApiBase
::LIMIT_BIG1
,
715 ApiBase
::PARAM_MAX2
=> ApiBase
::LIMIT_BIG2
,
716 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-limit',
718 'expandtemplates' => [
719 ApiBase
::PARAM_DFLT
=> false,
720 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-expandtemplates',
721 ApiBase
::PARAM_DEPRECATED
=> true,
724 ApiBase
::PARAM_DFLT
=> false,
725 ApiBase
::PARAM_DEPRECATED
=> true,
726 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-generatexml',
729 ApiBase
::PARAM_DFLT
=> false,
730 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-parse',
731 ApiBase
::PARAM_DEPRECATED
=> true,
734 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-section',
737 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-diffto',
738 ApiBase
::PARAM_DEPRECATED
=> true,
741 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-difftotext',
742 ApiBase
::PARAM_DEPRECATED
=> true,
745 ApiBase
::PARAM_DFLT
=> false,
746 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-difftotextpst',
747 ApiBase
::PARAM_DEPRECATED
=> true,
750 ApiBase
::PARAM_TYPE
=> ContentHandler
::getAllContentFormats(),
751 ApiBase
::PARAM_HELP_MSG
=> 'apihelp-query+revisions+base-param-contentformat',
752 ApiBase
::PARAM_DEPRECATED
=> true,