60 private const IS_DELETED = 1;
61 private const CANNOT_VIEW = 2;
63 private const LIMIT_PARSE = 1;
115 private $numUncachedDiffs = 0;
160 parent::__construct( $queryModule, $moduleName, $paramPrefix );
163 $services = MediaWikiServices::getInstance();
164 $this->revisionStore = $revisionStore ?? $services->getRevisionStore();
165 $this->contentHandlerFactory = $contentHandlerFactory ?? $services->getContentHandlerFactory();
166 $this->parserFactory = $parserFactory ?? $services->getParserFactory();
167 $this->slotRoleRegistry = $slotRoleRegistry ?? $services->getSlotRoleRegistry();
168 $this->contentRenderer = $contentRenderer ?? $services->getContentRenderer();
169 $this->contentTransformer = $contentTransformer ?? $services->getContentTransformer();
170 $this->commentFormatter = $commentFormatter ?? $services->getCommentFormatter();
171 $this->tempUserCreator = $tempUserCreator ?? $services->getTempUserCreator();
172 $this->userFactory = $userFactory ?? $services->getUserFactory();
173 $this->userNameUtils = $userNameUtils ?? $services->getUserNameUtils();
181 $this->
run( $resultPageSet );
196 $prop = array_fill_keys(
$params[
'prop'],
true );
198 $this->fld_ids = isset( $prop[
'ids'] );
199 $this->fld_flags = isset( $prop[
'flags'] );
200 $this->fld_timestamp = isset( $prop[
'timestamp'] );
201 $this->fld_comment = isset( $prop[
'comment'] );
202 $this->fld_parsedcomment = isset( $prop[
'parsedcomment'] );
203 $this->fld_size = isset( $prop[
'size'] );
204 $this->fld_slotsize = isset( $prop[
'slotsize'] );
205 $this->fld_sha1 = isset( $prop[
'sha1'] );
206 $this->fld_slotsha1 = isset( $prop[
'slotsha1'] );
207 $this->fld_content = isset( $prop[
'content'] );
208 $this->fld_contentmodel = isset( $prop[
'contentmodel'] );
209 $this->fld_userid = isset( $prop[
'userid'] );
210 $this->fld_user = isset( $prop[
'user'] );
211 $this->fld_tags = isset( $prop[
'tags'] );
212 $this->fld_roles = isset( $prop[
'roles'] );
213 $this->fld_parsetree = isset( $prop[
'parsetree'] );
215 $this->slotRoles =
$params[
'slots'];
217 if ( $this->slotRoles !==
null ) {
218 if ( $this->fld_parsetree ) {
220 'apierror-invalidparammix-cannotusewith',
223 ],
'invalidparammix' );
226 'expandtemplates',
'generatexml',
'parse',
'diffto',
'difftotext',
'difftotextpst',
231 'apierror-invalidparammix-cannotusewith',
234 ],
'invalidparammix' );
237 $this->slotContentFormats = [];
238 foreach ( $this->slotRoles as $slotRole ) {
239 if ( isset(
$params[
'contentformat-' . $slotRole] ) ) {
240 $this->slotContentFormats[$slotRole] =
$params[
'contentformat-' . $slotRole];
245 if ( !empty(
$params[
'contentformat'] ) ) {
246 $this->contentFormat =
$params[
'contentformat'];
249 $this->limit =
$params[
'limit'];
251 if (
$params[
'difftotext'] !==
null ) {
252 $this->difftotext =
$params[
'difftotext'];
253 $this->difftotextpst =
$params[
'difftotextpst'];
254 } elseif (
$params[
'diffto'] !==
null ) {
255 if (
$params[
'diffto'] ==
'cur' ) {
258 if ( ( !ctype_digit(
$params[
'diffto'] ) ||
$params[
'diffto'] < 0 )
262 $this->
dieWithError( [
'apierror-baddiffto', $p ],
'diffto' );
267 if ( is_numeric(
$params[
'diffto'] ) &&
$params[
'diffto'] != 0 ) {
268 $difftoRev = $this->revisionStore->getRevisionById(
$params[
'diffto'] );
273 $revDel = $this->checkRevDel( $difftoRev, RevisionRecord::DELETED_TEXT );
274 if ( $revDel & self::CANNOT_VIEW ) {
275 $this->
addWarning( [
'apiwarn-difftohidden', $difftoRev->getId() ] );
279 $this->diffto =
$params[
'diffto'];
282 $this->fetchContent = $this->fld_content || $this->diffto !==
null
286 if ( $this->fetchContent ) {
288 $this->expandTemplates =
$params[
'expandtemplates'];
289 $this->generateXML =
$params[
'generatexml'];
290 $this->parseContent =
$params[
'parse'];
291 if ( $this->parseContent ) {
293 $this->limit ??= self::LIMIT_PARSE;
295 $this->section =
$params[
'section'] ??
false;
298 $userMax = $this->parseContent ? self::LIMIT_PARSE :
300 $botMax = $this->parseContent ? self::LIMIT_PARSE :
302 if ( $this->limit ==
'max' ) {
303 $this->limit = $this->
getMain()->canApiHighLimits() ? $botMax : $userMax;
304 if ( $this->setParsedLimit ) {
309 $this->limit = $this->
getMain()->getParamValidator()->validateValue(
310 $this,
'limit', $this->limit ?? 10, [
311 ParamValidator::PARAM_TYPE =>
'limit',
312 IntegerDef::PARAM_MIN => 1,
313 IntegerDef::PARAM_MAX => $userMax,
314 IntegerDef::PARAM_MAX2 => $botMax,
315 IntegerDef::PARAM_IGNORE_RANGE =>
true,
319 $this->needSlots = $this->fetchContent || $this->fld_contentmodel ||
321 if ( $this->needSlots && $this->slotRoles ===
null ) {
325 $parentParam = $parent->encodeParamName( $parent->getModuleManager()->getModuleGroup( $name ) );
327 [
'apiwarn-deprecation-missingparam', $encParam ],
328 "action=query&{$parentParam}={$name}&!{$encParam}"
340 private function checkRevDel(
RevisionRecord $revision, $field ) {
341 $ret = $revision->
isDeleted( $field ) ? self::IS_DELETED : 0;
344 $ret |= ( $canSee ? 0 : self::CANNOT_VIEW );
361 if ( $this->fld_ids ) {
362 $vals[
'revid'] = (int)$revision->
getId();
368 if ( $this->fld_flags ) {
369 $vals[
'minor'] = $revision->
isMinor();
372 if ( $this->fld_user || $this->fld_userid ) {
373 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_USER );
374 if ( $revDel & self::IS_DELETED ) {
375 $vals[
'userhidden'] =
true;
378 if ( !( $revDel & self::CANNOT_VIEW ) ) {
379 $u = $revision->
getUser( RevisionRecord::RAW );
380 if ( $this->fld_user ) {
381 $vals[
'user'] = $u->getName();
383 if ( $this->userNameUtils->isTemp( $u->getName() ) ) {
384 $vals[
'temp'] =
true;
386 if ( !$u->isRegistered() ) {
387 $vals[
'anon'] =
true;
390 if ( $this->fld_userid ) {
391 $vals[
'userid'] = $u->getId();
396 if ( $this->fld_timestamp ) {
400 if ( $this->fld_size ) {
402 $vals[
'size'] = (int)$revision->
getSize();
410 if ( $this->fld_sha1 ) {
411 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_TEXT );
412 if ( $revDel & self::IS_DELETED ) {
413 $vals[
'sha1hidden'] =
true;
416 if ( !( $revDel & self::CANNOT_VIEW ) ) {
418 $vals[
'sha1'] = Wikimedia\base_convert( $revision->
getSha1(), 36, 16, 40 );
428 if ( $this->fld_roles ) {
432 if ( $this->needSlots ) {
433 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_TEXT );
434 if ( ( $this->fld_slotsha1 || $this->fetchContent ) && ( $revDel & self::IS_DELETED ) ) {
437 $vals = array_merge( $vals, $this->extractAllSlotInfo( $revision, $revDel ) );
442 $vals[
'slotsmissing'] =
true;
444 LoggerFactory::getInstance(
'api-warning' )->error(
445 'Failed to access revision slots',
446 [
'revision' => $revision->
getId(),
'exception' => $ex, ]
450 if ( $this->fld_comment || $this->fld_parsedcomment ) {
451 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_COMMENT );
452 if ( $revDel & self::IS_DELETED ) {
453 $vals[
'commenthidden'] =
true;
456 if ( !( $revDel & self::CANNOT_VIEW ) ) {
457 $comment = $revision->
getComment( RevisionRecord::RAW );
458 $comment = $comment->text ??
'';
460 if ( $this->fld_comment ) {
461 $vals[
'comment'] = $comment;
464 if ( $this->fld_parsedcomment ) {
465 $vals[
'parsedcomment'] = $this->commentFormatter->format(
472 if ( $this->fld_tags ) {
473 if ( $row->ts_tags ) {
474 $tags = explode(
',', $row->ts_tags );
475 ApiResult::setIndexedTagName( $tags,
'tag' );
476 $vals[
'tags'] = $tags;
482 if ( $anyHidden && $revision->
isDeleted( RevisionRecord::DELETED_RESTRICTED ) ) {
483 $vals[
'suppressed'] =
true;
498 private function extractAllSlotInfo(
RevisionRecord $revision, $revDel ): array {
501 if ( $this->slotRoles ===
null ) {
503 $slot = $revision->
getSlot( SlotRecord::MAIN, RevisionRecord::RAW );
507 $vals[
'textmissing'] =
true;
513 $vals += $this->extractSlotInfo( $slot, $revDel, $content );
514 if ( !empty( $vals[
'nosuchsection'] ) ) {
517 'apierror-nosuchsection-what',
519 $this->
msg(
'revid', $revision->
getId() )
525 $vals += $this->extractDeprecatedContent( $content, $revision );
529 $roles = array_intersect( $this->slotRoles, $revision->
getSlotRoles() );
533 foreach ( $roles as $role ) {
535 $slot = $revision->
getSlot( $role, RevisionRecord::RAW );
539 $vals[
'slots'][$role][
'missing'] =
true;
543 $vals[
'slots'][$role] = $this->extractSlotInfo( $slot, $revDel, $content );
548 $model = $content->getModel();
549 $format = $this->slotContentFormats[$role] ?? $content->getDefaultFormat();
550 if ( !$content->isSupportedFormat( $format ) ) {
552 'apierror-badformat',
555 $this->
msg(
'revid', $revision->
getId() )
557 $vals[
'slots'][$role][
'badcontentformat'] =
true;
559 $vals[
'slots'][$role][
'contentmodel'] = $model;
560 $vals[
'slots'][$role][
'contentformat'] = $format;
562 $vals[
'slots'][$role],
564 $content->serialize( $format )
584 private function extractSlotInfo(
SlotRecord $slot, $revDel, &$content =
null ) {
588 if ( $this->fld_slotsize ) {
589 $vals[
'size'] = (int)$slot->
getSize();
592 if ( $this->fld_slotsha1 ) {
593 if ( $revDel & self::IS_DELETED ) {
594 $vals[
'sha1hidden'] =
true;
596 if ( !( $revDel & self::CANNOT_VIEW ) ) {
597 if ( $slot->
getSha1() !=
'' ) {
598 $vals[
'sha1'] = Wikimedia\base_convert( $slot->
getSha1(), 36, 16, 40 );
605 if ( $this->fld_contentmodel ) {
606 $vals[
'contentmodel'] = $slot->
getModel();
610 if ( $this->fetchContent ) {
611 if ( $revDel & self::IS_DELETED ) {
612 $vals[
'texthidden'] =
true;
614 if ( !( $revDel & self::CANNOT_VIEW ) ) {
619 $vals[
'textmissing'] =
true;
624 if ( $content && $this->section !==
false ) {
625 $content = $content->getSection( $this->section );
627 $vals[
'nosuchsection'] =
true;
642 private function extractDeprecatedContent( Content $content,
RevisionRecord $revision ) {
646 if ( $this->fld_parsetree || ( $this->fld_content && $this->generateXML ) ) {
649 '@phan-var WikitextContent $content';
650 $t = $content->getText(); # note: don
't set $text
652 $parser = $this->parserFactory->create();
653 $parser->startExternalParse(
655 ParserOptions::newFromContext( $this->getContext() ),
656 Parser::OT_PREPROCESS
658 $dom = $parser->preprocessToDom( $t );
659 // @phan-suppress-next-line PhanUndeclaredMethodInCallable
660 if ( is_callable( [ $dom, 'saveXML
' ] ) ) {
661 // @phan-suppress-next-line PhanUndeclaredMethod
662 $xml = $dom->saveXML();
664 // @phan-suppress-next-line PhanUndeclaredMethod
665 $xml = $dom->__toString();
667 $vals['parsetree
'] = $xml;
669 $vals['badcontentformatforparsetree
'] = true;
672 'apierror-parsetree-notwikitext-title
',
673 wfEscapeWikiText( $title->getPrefixedText() ),
676 'parsetree-notwikitext
'
681 if ( $this->fld_content ) {
684 if ( $this->expandTemplates && !$this->parseContent ) {
685 if ( $content->getModel() === CONTENT_MODEL_WIKITEXT ) {
688 $text = $content->getText();
690 $text = $this->parserFactory->create()->preprocess(
693 ParserOptions::newFromContext( $this->getContext() )
697 'apierror-templateexpansion-notwikitext
',
698 wfEscapeWikiText( $title->getPrefixedText() ),
701 $vals['badcontentformat
'] = true;
705 if ( $this->parseContent ) {
706 $popts = ParserOptions::newFromContext( $this->getContext() );
707 $po = $this->contentRenderer->getParserOutput(
713 // TODO T371004 move runOutputPipeline out of $parserOutput
714 $text = $po->runOutputPipeline( $popts, [] )->getContentHolderText();
717 if ( $text === null ) {
718 $format = $this->contentFormat ?: $content->getDefaultFormat();
719 $model = $content->getModel();
721 if ( !$content->isSupportedFormat( $format ) ) {
722 $name = wfEscapeWikiText( $title->getPrefixedText() );
723 $this->addWarning( [ 'apierror-badformat
', $this->contentFormat, $model, $name ] );
724 $vals['badcontentformat
'] = true;
727 $text = $content->serialize( $format );
728 // always include format and model.
729 // Format is needed to deserialize, model is needed to interpret.
730 $vals['contentformat
'] = $format;
731 $vals['contentmodel
'] = $model;
735 if ( $text !== false ) {
736 ApiResult::setContentValue( $vals, 'content
', $text );
740 if ( $content && ( $this->diffto !== null || $this->difftotext !== null ) ) {
741 if ( $this->numUncachedDiffs < $this->getConfig()->get( MainConfigNames::APIMaxUncachedDiffs ) ) {
743 $context = new DerivativeContext( $this->getContext() );
744 $context->setTitle( $title );
745 $handler = $content->getContentHandler();
747 if ( $this->difftotext !== null ) {
748 $model = $title->getContentModel();
750 if ( $this->contentFormat
751 && !$this->contentHandlerFactory->getContentHandler( $model )
752 ->isSupportedFormat( $this->contentFormat )
754 $name = wfEscapeWikiText( $title->getPrefixedText() );
755 $this->addWarning( [ 'apierror-badformat
', $this->contentFormat, $model, $name ] );
756 $vals['diff
']['badcontentformat
'] = true;
759 $difftocontent = $this->contentHandlerFactory->getContentHandler( $model )
760 ->unserializeContent( $this->difftotext, $this->contentFormat );
762 if ( $this->difftotextpst ) {
763 $popts = ParserOptions::newFromContext( $this->getContext() );
764 $difftocontent = $this->contentTransformer->preSaveTransform(
767 $this->getUserForPreview(),
772 $engine = $handler->createDifferenceEngine( $context );
773 $engine->setContent( $content, $difftocontent );
776 $engine = $handler->createDifferenceEngine( $context, $revision->getId(), $this->diffto );
777 $vals['diff
']['from
'] = $engine->getOldid();
778 $vals['diff
']['to
'] = $engine->getNewid();
781 $difftext = $engine->getDiffBody();
782 ApiResult::setContentValue( $vals['diff
'], 'body
', $difftext );
783 if ( !$engine->wasCacheHit() ) {
784 $this->numUncachedDiffs++;
786 foreach ( $engine->getRevisionLoadErrors() as $msg ) {
787 $this->addWarning( $msg );
791 $vals['diff
']['notcached
'] = true;
798 private function getUserForPreview() {
799 $user = $this->getUser();
800 if ( $this->tempUserCreator->shouldAutoCreate( $user, 'edit
' ) ) {
801 return $this->userFactory->newUnsavedTempUser(
802 $this->tempUserCreator->getStashedName( $this->getRequest()->getSession() )
814 public function getCacheMode( $params ) {
815 if ( $this->userCanSeeRevDel() ) {
826 public function getAllowedParams() {
827 $slotRoles = $this->slotRoleRegistry->getKnownRoles();
828 sort( $slotRoles, SORT_STRING );
829 $smallLimit = $this->getMain()->canApiHighLimits() ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_SML1;
833 ParamValidator::PARAM_ISMULTI => true,
834 ParamValidator::PARAM_DEFAULT => 'ids|timestamp|flags|comment|user
',
835 ParamValidator::PARAM_TYPE => [
853 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-prop
',
854 ApiBase::PARAM_HELP_MSG_PER_VALUE => [
855 'ids
' => 'apihelp-query+revisions+base-paramvalue-prop-ids
',
856 'flags
' => 'apihelp-query+revisions+base-paramvalue-prop-flags
',
857 'timestamp
' => 'apihelp-query+revisions+base-paramvalue-prop-timestamp
',
858 'user
' => 'apihelp-query+revisions+base-paramvalue-prop-user
',
859 'userid
' => 'apihelp-query+revisions+base-paramvalue-prop-userid
',
860 'size
' => 'apihelp-query+revisions+base-paramvalue-prop-size
',
861 'slotsize
' => 'apihelp-query+revisions+base-paramvalue-prop-slotsize
',
862 'sha1
' => 'apihelp-query+revisions+base-paramvalue-prop-sha1
',
863 'slotsha1
' => 'apihelp-query+revisions+base-paramvalue-prop-slotsha1
',
864 'contentmodel
' => 'apihelp-query+revisions+base-paramvalue-prop-contentmodel
',
865 'comment
' => 'apihelp-query+revisions+base-paramvalue-prop-comment
',
866 'parsedcomment
' => 'apihelp-query+revisions+base-paramvalue-prop-parsedcomment
',
867 'content
' => [ 'apihelp-query+revisions+base-paramvalue-prop-content
', $smallLimit ],
868 'tags
' => 'apihelp-query+revisions+base-paramvalue-prop-tags
',
869 'roles
' => 'apihelp-query+revisions+base-paramvalue-prop-roles
',
870 'parsetree
' => [ 'apihelp-query+revisions+base-paramvalue-prop-parsetree
',
871 CONTENT_MODEL_WIKITEXT, $smallLimit ],
873 EnumDef::PARAM_DEPRECATED_VALUES => [
878 ParamValidator::PARAM_TYPE => $slotRoles,
879 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-slots
',
880 ParamValidator::PARAM_ISMULTI => true,
881 ParamValidator::PARAM_ALL => true,
883 'contentformat-{slot}
' => [
884 ApiBase::PARAM_TEMPLATE_VARS => [ 'slot
' => 'slots
' ],
885 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-contentformat-slot
',
886 ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
889 ParamValidator::PARAM_TYPE => 'limit
',
890 IntegerDef::PARAM_MIN => 1,
891 IntegerDef::PARAM_MAX => ApiBase::LIMIT_BIG1,
892 IntegerDef::PARAM_MAX2 => ApiBase::LIMIT_BIG2,
893 ApiBase::PARAM_HELP_MSG => [ 'apihelp-query+revisions+base-param-limit
',
894 $smallLimit, self::LIMIT_PARSE ],
896 'expandtemplates
' => [
897 ParamValidator::PARAM_DEFAULT => false,
898 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-expandtemplates
',
899 ParamValidator::PARAM_DEPRECATED => true,
902 ParamValidator::PARAM_DEFAULT => false,
903 ParamValidator::PARAM_DEPRECATED => true,
904 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-generatexml
',
907 ParamValidator::PARAM_DEFAULT => false,
908 ApiBase::PARAM_HELP_MSG => [ 'apihelp-query+revisions+base-param-parse
', self::LIMIT_PARSE ],
909 ParamValidator::PARAM_DEPRECATED => true,
912 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-section
',
915 ApiBase::PARAM_HELP_MSG => [ 'apihelp-query+revisions+base-param-diffto
', $smallLimit ],
916 ParamValidator::PARAM_DEPRECATED => true,
919 ApiBase::PARAM_HELP_MSG => [ 'apihelp-query+revisions+base-param-difftotext
', $smallLimit ],
920 ParamValidator::PARAM_DEPRECATED => true,
923 ParamValidator::PARAM_DEFAULT => false,
924 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotextpst
',
925 ParamValidator::PARAM_DEPRECATED => true,
928 ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
929 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-contentformat
',
930 ParamValidator::PARAM_DEPRECATED => true,
const CONTENT_MODEL_WIKITEXT
wfEscapeWikiText( $input)
Escapes the given text so that it may be output using addWikiText() without any linking,...
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
array $params
The job parameters.
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
getMain()
Get the main module.
addDeprecation( $msg, $feature, $data=[])
Add a deprecation warning for this module.
const LIMIT_BIG1
Fast query, standard limit.
const LIMIT_SML2
Slow query, apihighlimits limit.
getResult()
Get the result object.
const LIMIT_SML1
Slow query, standard limit.
addWarning( $msg, $code=null, $data=null)
Add a warning for this module.
const LIMIT_BIG2
Fast query, apihighlimits limit.
getModuleName()
Get the name of the module being executed by this instance.
This class contains a list of pages that the client has requested.
getParent()
Get the parent of this module.to override 1.25 ApiBase|null
encodeParamName( $paramName)
Overrides ApiBase to prepend 'g' to every generator parameter.
A base class for functions common to producing a list of revisions.
bool $parseContent
The number of uncached diffs that had to be generated for this request.
executeGenerator( $resultPageSet)
The number of uncached diffs that had to be generated for this request.
bool $difftotextpst
The number of uncached diffs that had to be generated for this request.
bool $needSlots
The number of uncached diffs that had to be generated for this request.
bool $fld_ids
The number of uncached diffs that had to be generated for this request.
bool $fld_tags
The number of uncached diffs that had to be generated for this request.
bool $fld_parsetree
The number of uncached diffs that had to be generated for this request.
string null $difftotext
The number of uncached diffs that had to be generated for this request.
bool $fld_roles
The number of uncached diffs that had to be generated for this request.
bool $fld_content
The number of uncached diffs that had to be generated for this request.
parseParameters( $params)
Parse the parameters into the various instance fields.
string $contentFormat
The number of uncached diffs that had to be generated for this request.
int string null $expandTemplates
The number of uncached diffs that had to be generated for this request.
bool $fetchContent
The number of uncached diffs that had to be generated for this request.
bool $fld_sha1
The number of uncached diffs that had to be generated for this request.
bool $fld_flags
The number of uncached diffs that had to be generated for this request.
bool $setParsedLimit
The number of uncached diffs that had to be generated for this request.
bool $fld_userid
The number of uncached diffs that had to be generated for this request.
bool $fld_slotsha1
The number of uncached diffs that had to be generated for this request.
array $slotRoles
The number of uncached diffs that had to be generated for this request.
bool $generateXML
The number of uncached diffs that had to be generated for this request.
execute()
The number of uncached diffs that had to be generated for this request.
bool $fld_slotsize
The number of uncached diffs that had to be generated for this request.
__construct(ApiQuery $queryModule, $moduleName, $paramPrefix='', RevisionStore $revisionStore=null, IContentHandlerFactory $contentHandlerFactory=null, ParserFactory $parserFactory=null, SlotRoleRegistry $slotRoleRegistry=null, ContentRenderer $contentRenderer=null, ContentTransformer $contentTransformer=null, CommentFormatter $commentFormatter=null, TempUserCreator $tempUserCreator=null, UserFactory $userFactory=null, UserNameUtils $userNameUtils=null)
bool $fld_parsedcomment
The number of uncached diffs that had to be generated for this request.
bool $fld_timestamp
The number of uncached diffs that had to be generated for this request.
int string null $diffto
The number of uncached diffs that had to be generated for this request.
bool $fld_user
The number of uncached diffs that had to be generated for this request.
int string null $limit
The number of uncached diffs that had to be generated for this request.
bool $fld_size
The number of uncached diffs that had to be generated for this request.
run(ApiPageSet $resultPageSet=null)
string[] $slotContentFormats
The number of uncached diffs that had to be generated for this request.
bool $fld_contentmodel
The number of uncached diffs that had to be generated for this request.
bool $fld_comment
The number of uncached diffs that had to be generated for this request.
extractRevisionInfo(RevisionRecord $revision, $row)
Extract information from the RevisionRecord.
int string null $section
The number of uncached diffs that had to be generated for this request.
This is the main query class.
static setArrayType(array &$arr, $type, $kvpKeyName=null)
Set the array data type.
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
const META_KVP_MERGE
Key for the metadata item that indicates that the KVP key should be added into an assoc value,...
static setContentValue(array &$arr, $name, $value, $flags=0)
Add an output value to the array by name and mark as META_CONTENT.
A service to render content.
A service to transform content.
Content object for wiki text pages.
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
An IContextSource implementation which will inherit context from another source but allow individual ...
A class containing constants representing the names of configuration variables.