58 private const IS_DELETED = 1;
59 private const CANNOT_VIEW = 2;
61 private const LIMIT_PARSE = 1;
102 private $numUncachedDiffs = 0;
147 parent::__construct( $queryModule, $moduleName, $paramPrefix );
150 $services = MediaWikiServices::getInstance();
151 $this->revisionStore = $revisionStore ?? $services->getRevisionStore();
152 $this->contentHandlerFactory = $contentHandlerFactory ?? $services->getContentHandlerFactory();
153 $this->parserFactory = $parserFactory ?? $services->getParserFactory();
154 $this->slotRoleRegistry = $slotRoleRegistry ?? $services->getSlotRoleRegistry();
155 $this->contentRenderer = $contentRenderer ?? $services->getContentRenderer();
156 $this->contentTransformer = $contentTransformer ?? $services->getContentTransformer();
157 $this->commentFormatter = $commentFormatter ?? $services->getCommentFormatter();
158 $this->tempUserCreator = $tempUserCreator ?? $services->getTempUserCreator();
159 $this->userFactory = $userFactory ?? $services->getUserFactory();
160 $this->userNameUtils = $userNameUtils ?? $services->getUserNameUtils();
168 $this->
run( $resultPageSet );
183 $prop = array_fill_keys(
$params[
'prop'],
true );
185 $this->fld_ids = isset( $prop[
'ids'] );
186 $this->fld_flags = isset( $prop[
'flags'] );
187 $this->fld_timestamp = isset( $prop[
'timestamp'] );
188 $this->fld_comment = isset( $prop[
'comment'] );
189 $this->fld_parsedcomment = isset( $prop[
'parsedcomment'] );
190 $this->fld_size = isset( $prop[
'size'] );
191 $this->fld_slotsize = isset( $prop[
'slotsize'] );
192 $this->fld_sha1 = isset( $prop[
'sha1'] );
193 $this->fld_slotsha1 = isset( $prop[
'slotsha1'] );
194 $this->fld_content = isset( $prop[
'content'] );
195 $this->fld_contentmodel = isset( $prop[
'contentmodel'] );
196 $this->fld_userid = isset( $prop[
'userid'] );
197 $this->fld_user = isset( $prop[
'user'] );
198 $this->fld_tags = isset( $prop[
'tags'] );
199 $this->fld_roles = isset( $prop[
'roles'] );
200 $this->fld_parsetree = isset( $prop[
'parsetree'] );
202 $this->slotRoles =
$params[
'slots'];
204 if ( $this->slotRoles !==
null ) {
205 if ( $this->fld_parsetree ) {
207 'apierror-invalidparammix-cannotusewith',
210 ],
'invalidparammix' );
213 'expandtemplates',
'generatexml',
'parse',
'diffto',
'difftotext',
'difftotextpst',
218 'apierror-invalidparammix-cannotusewith',
221 ],
'invalidparammix' );
224 $this->slotContentFormats = [];
225 foreach ( $this->slotRoles as $slotRole ) {
226 if ( isset(
$params[
'contentformat-' . $slotRole] ) ) {
227 $this->slotContentFormats[$slotRole] =
$params[
'contentformat-' . $slotRole];
232 if ( !empty(
$params[
'contentformat'] ) ) {
233 $this->contentFormat =
$params[
'contentformat'];
236 $this->limit =
$params[
'limit'];
238 if (
$params[
'difftotext'] !==
null ) {
239 $this->difftotext =
$params[
'difftotext'];
240 $this->difftotextpst =
$params[
'difftotextpst'];
241 } elseif (
$params[
'diffto'] !==
null ) {
242 if (
$params[
'diffto'] ==
'cur' ) {
245 if ( ( !ctype_digit(
$params[
'diffto'] ) ||
$params[
'diffto'] < 0 )
249 $this->
dieWithError( [
'apierror-baddiffto', $p ],
'diffto' );
254 if ( is_numeric(
$params[
'diffto'] ) &&
$params[
'diffto'] != 0 ) {
255 $difftoRev = $this->revisionStore->getRevisionById(
$params[
'diffto'] );
260 $revDel = $this->checkRevDel( $difftoRev, RevisionRecord::DELETED_TEXT );
261 if ( $revDel & self::CANNOT_VIEW ) {
262 $this->
addWarning( [
'apiwarn-difftohidden', $difftoRev->getId() ] );
266 $this->diffto =
$params[
'diffto'];
269 $this->fetchContent = $this->fld_content || $this->diffto !==
null
273 if ( $this->fetchContent ) {
275 $this->expandTemplates =
$params[
'expandtemplates'];
276 $this->generateXML =
$params[
'generatexml'];
277 $this->parseContent =
$params[
'parse'];
278 if ( $this->parseContent ) {
280 $this->limit ??= self::LIMIT_PARSE;
282 $this->section =
$params[
'section'] ??
false;
285 $userMax = $this->parseContent ? self::LIMIT_PARSE :
287 $botMax = $this->parseContent ? self::LIMIT_PARSE :
289 if ( $this->limit ==
'max' ) {
290 $this->limit = $this->
getMain()->canApiHighLimits() ? $botMax : $userMax;
291 if ( $this->setParsedLimit ) {
296 $this->limit = $this->
getMain()->getParamValidator()->validateValue(
297 $this,
'limit', $this->limit ?? 10, [
298 ParamValidator::PARAM_TYPE =>
'limit',
299 IntegerDef::PARAM_MIN => 1,
300 IntegerDef::PARAM_MAX => $userMax,
301 IntegerDef::PARAM_MAX2 => $botMax,
302 IntegerDef::PARAM_IGNORE_RANGE =>
true,
306 $this->needSlots = $this->fetchContent || $this->fld_contentmodel ||
308 if ( $this->needSlots && $this->slotRoles ===
null ) {
312 $parentParam = $parent->encodeParamName( $parent->getModuleManager()->getModuleGroup( $name ) );
314 [
'apiwarn-deprecation-missingparam', $encParam ],
315 "action=query&{$parentParam}={$name}&!{$encParam}"
327 private function checkRevDel(
RevisionRecord $revision, $field ) {
328 $ret = $revision->
isDeleted( $field ) ? self::IS_DELETED : 0;
331 $ret |= ( $canSee ? 0 : self::CANNOT_VIEW );
348 if ( $this->fld_ids ) {
349 $vals[
'revid'] = (int)$revision->
getId();
355 if ( $this->fld_flags ) {
356 $vals[
'minor'] = $revision->
isMinor();
359 if ( $this->fld_user || $this->fld_userid ) {
360 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_USER );
361 if ( $revDel & self::IS_DELETED ) {
362 $vals[
'userhidden'] =
true;
365 if ( !( $revDel & self::CANNOT_VIEW ) ) {
366 $u = $revision->
getUser( RevisionRecord::RAW );
367 if ( $this->fld_user ) {
368 $vals[
'user'] = $u->getName();
370 if ( $this->userNameUtils->isTemp( $u->getName() ) ) {
371 $vals[
'temp'] =
true;
373 if ( !$u->isRegistered() ) {
374 $vals[
'anon'] =
true;
377 if ( $this->fld_userid ) {
378 $vals[
'userid'] = $u->getId();
383 if ( $this->fld_timestamp ) {
387 if ( $this->fld_size ) {
389 $vals[
'size'] = (int)$revision->
getSize();
397 if ( $this->fld_sha1 ) {
398 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_TEXT );
399 if ( $revDel & self::IS_DELETED ) {
400 $vals[
'sha1hidden'] =
true;
403 if ( !( $revDel & self::CANNOT_VIEW ) ) {
405 $vals[
'sha1'] = Wikimedia\base_convert( $revision->
getSha1(), 36, 16, 40 );
415 if ( $this->fld_roles ) {
419 if ( $this->needSlots ) {
420 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_TEXT );
421 if ( ( $this->fld_slotsha1 || $this->fetchContent ) && ( $revDel & self::IS_DELETED ) ) {
424 $vals = array_merge( $vals, $this->extractAllSlotInfo( $revision, $revDel ) );
429 $vals[
'slotsmissing'] =
true;
431 LoggerFactory::getInstance(
'api-warning' )->error(
432 'Failed to access revision slots',
433 [
'revision' => $revision->
getId(),
'exception' => $ex, ]
437 if ( $this->fld_comment || $this->fld_parsedcomment ) {
438 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_COMMENT );
439 if ( $revDel & self::IS_DELETED ) {
440 $vals[
'commenthidden'] =
true;
443 if ( !( $revDel & self::CANNOT_VIEW ) ) {
444 $comment = $revision->
getComment( RevisionRecord::RAW );
445 $comment = $comment->text ??
'';
447 if ( $this->fld_comment ) {
448 $vals[
'comment'] = $comment;
451 if ( $this->fld_parsedcomment ) {
452 $vals[
'parsedcomment'] = $this->commentFormatter->format(
459 if ( $this->fld_tags ) {
460 if ( $row->ts_tags ) {
461 $tags = explode(
',', $row->ts_tags );
462 ApiResult::setIndexedTagName( $tags,
'tag' );
463 $vals[
'tags'] = $tags;
469 if ( $anyHidden && $revision->
isDeleted( RevisionRecord::DELETED_RESTRICTED ) ) {
470 $vals[
'suppressed'] =
true;
485 private function extractAllSlotInfo(
RevisionRecord $revision, $revDel ): array {
488 if ( $this->slotRoles ===
null ) {
490 $slot = $revision->
getSlot( SlotRecord::MAIN, RevisionRecord::RAW );
494 $vals[
'textmissing'] =
true;
500 $vals += $this->extractSlotInfo( $slot, $revDel, $content );
501 if ( !empty( $vals[
'nosuchsection'] ) ) {
504 'apierror-nosuchsection-what',
506 $this->
msg(
'revid', $revision->
getId() )
512 $vals += $this->extractDeprecatedContent( $content, $revision );
516 $roles = array_intersect( $this->slotRoles, $revision->
getSlotRoles() );
520 foreach ( $roles as $role ) {
522 $slot = $revision->
getSlot( $role, RevisionRecord::RAW );
526 $vals[
'slots'][$role][
'missing'] =
true;
530 $vals[
'slots'][$role] = $this->extractSlotInfo( $slot, $revDel, $content );
539 'apierror-badformat',
542 $this->
msg(
'revid', $revision->
getId() )
544 $vals[
'slots'][$role][
'badcontentformat'] =
true;
546 $vals[
'slots'][$role][
'contentmodel'] = $model;
547 $vals[
'slots'][$role][
'contentformat'] = $format;
549 $vals[
'slots'][$role],
571 private function extractSlotInfo(
SlotRecord $slot, $revDel, &$content =
null ) {
575 if ( $this->fld_slotsize ) {
576 $vals[
'size'] = (int)$slot->
getSize();
579 if ( $this->fld_slotsha1 ) {
580 if ( $revDel & self::IS_DELETED ) {
581 $vals[
'sha1hidden'] =
true;
583 if ( !( $revDel & self::CANNOT_VIEW ) ) {
584 if ( $slot->
getSha1() !=
'' ) {
585 $vals[
'sha1'] = Wikimedia\base_convert( $slot->
getSha1(), 36, 16, 40 );
592 if ( $this->fld_contentmodel ) {
593 $vals[
'contentmodel'] = $slot->
getModel();
597 if ( $this->fetchContent ) {
598 if ( $revDel & self::IS_DELETED ) {
599 $vals[
'texthidden'] =
true;
601 if ( !( $revDel & self::CANNOT_VIEW ) ) {
606 $vals[
'textmissing'] =
true;
611 if ( $content && $this->section !==
false ) {
612 $content = $content->
getSection( $this->section );
614 $vals[
'nosuchsection'] =
true;
633 if ( $this->fld_parsetree || ( $this->fld_content && $this->generateXML ) ) {
636 '@phan-var WikitextContent $content';
637 $t = $content->getText(); # note: don
't set $text
639 $parser = $this->parserFactory->create();
640 $parser->startExternalParse(
642 ParserOptions::newFromContext( $this->getContext() ),
643 Parser::OT_PREPROCESS
645 $dom = $parser->preprocessToDom( $t );
646 // @phan-suppress-next-line PhanUndeclaredMethodInCallable
647 if ( is_callable( [ $dom, 'saveXML
' ] ) ) {
648 // @phan-suppress-next-line PhanUndeclaredMethod
649 $xml = $dom->saveXML();
651 // @phan-suppress-next-line PhanUndeclaredMethod
652 $xml = $dom->__toString();
654 $vals['parsetree
'] = $xml;
656 $vals['badcontentformatforparsetree
'] = true;
659 'apierror-parsetree-notwikitext-title
',
660 wfEscapeWikiText( $title->getPrefixedText() ),
663 'parsetree-notwikitext
'
668 if ( $this->fld_content ) {
671 if ( $this->expandTemplates && !$this->parseContent ) {
672 if ( $content->getModel() === CONTENT_MODEL_WIKITEXT ) {
675 $text = $content->getText();
677 $text = $this->parserFactory->create()->preprocess(
680 ParserOptions::newFromContext( $this->getContext() )
684 'apierror-templateexpansion-notwikitext
',
685 wfEscapeWikiText( $title->getPrefixedText() ),
688 $vals['badcontentformat
'] = true;
692 if ( $this->parseContent ) {
693 $po = $this->contentRenderer->getParserOutput(
697 ParserOptions::newFromContext( $this->getContext() )
699 $text = $po->getText();
702 if ( $text === null ) {
703 $format = $this->contentFormat ?: $content->getDefaultFormat();
704 $model = $content->getModel();
706 if ( !$content->isSupportedFormat( $format ) ) {
707 $name = wfEscapeWikiText( $title->getPrefixedText() );
708 $this->addWarning( [ 'apierror-badformat
', $this->contentFormat, $model, $name ] );
709 $vals['badcontentformat
'] = true;
712 $text = $content->serialize( $format );
713 // always include format and model.
714 // Format is needed to deserialize, model is needed to interpret.
715 $vals['contentformat
'] = $format;
716 $vals['contentmodel
'] = $model;
720 if ( $text !== false ) {
721 ApiResult::setContentValue( $vals, 'content
', $text );
725 if ( $content && ( $this->diffto !== null || $this->difftotext !== null ) ) {
726 if ( $this->numUncachedDiffs < $this->getConfig()->get( MainConfigNames::APIMaxUncachedDiffs ) ) {
728 $context = new DerivativeContext( $this->getContext() );
729 $context->setTitle( $title );
730 $handler = $content->getContentHandler();
732 if ( $this->difftotext !== null ) {
733 $model = $title->getContentModel();
735 if ( $this->contentFormat
736 && !$this->contentHandlerFactory->getContentHandler( $model )
737 ->isSupportedFormat( $this->contentFormat )
739 $name = wfEscapeWikiText( $title->getPrefixedText() );
740 $this->addWarning( [ 'apierror-badformat
', $this->contentFormat, $model, $name ] );
741 $vals['diff
']['badcontentformat
'] = true;
744 $difftocontent = $this->contentHandlerFactory->getContentHandler( $model )
745 ->unserializeContent( $this->difftotext, $this->contentFormat );
747 if ( $this->difftotextpst ) {
748 $popts = ParserOptions::newFromContext( $this->getContext() );
749 $difftocontent = $this->contentTransformer->preSaveTransform(
752 $this->getUserForPreview(),
757 $engine = $handler->createDifferenceEngine( $context );
758 $engine->setContent( $content, $difftocontent );
761 $engine = $handler->createDifferenceEngine( $context, $revision->getId(), $this->diffto );
762 $vals['diff
']['from
'] = $engine->getOldid();
763 $vals['diff
']['to
'] = $engine->getNewid();
766 $difftext = $engine->getDiffBody();
767 ApiResult::setContentValue( $vals['diff
'], 'body
', $difftext );
768 if ( !$engine->wasCacheHit() ) {
769 $this->numUncachedDiffs++;
771 foreach ( $engine->getRevisionLoadErrors() as $msg ) {
772 $this->addWarning( $msg );
776 $vals['diff
']['notcached
'] = true;
783 private function getUserForPreview() {
784 $user = $this->getUser();
785 if ( $this->tempUserCreator->shouldAutoCreate( $user, 'edit
' ) ) {
786 return $this->userFactory->newUnsavedTempUser(
787 $this->tempUserCreator->getStashedName( $this->getRequest()->getSession() )
799 public function getCacheMode( $params ) {
800 if ( $this->userCanSeeRevDel() ) {
811 public function getAllowedParams() {
812 $slotRoles = $this->slotRoleRegistry->getKnownRoles();
813 sort( $slotRoles, SORT_STRING );
814 $smallLimit = $this->getMain()->canApiHighLimits() ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_SML1;
818 ParamValidator::PARAM_ISMULTI => true,
819 ParamValidator::PARAM_DEFAULT => 'ids|timestamp|flags|comment|user
',
820 ParamValidator::PARAM_TYPE => [
838 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-prop
',
839 ApiBase::PARAM_HELP_MSG_PER_VALUE => [
840 'ids
' => 'apihelp-query+revisions+base-paramvalue-prop-ids
',
841 'flags
' => 'apihelp-query+revisions+base-paramvalue-prop-flags
',
842 'timestamp
' => 'apihelp-query+revisions+base-paramvalue-prop-timestamp
',
843 'user
' => 'apihelp-query+revisions+base-paramvalue-prop-user
',
844 'userid
' => 'apihelp-query+revisions+base-paramvalue-prop-userid
',
845 'size
' => 'apihelp-query+revisions+base-paramvalue-prop-size
',
846 'slotsize
' => 'apihelp-query+revisions+base-paramvalue-prop-slotsize
',
847 'sha1
' => 'apihelp-query+revisions+base-paramvalue-prop-sha1
',
848 'slotsha1
' => 'apihelp-query+revisions+base-paramvalue-prop-slotsha1
',
849 'contentmodel
' => 'apihelp-query+revisions+base-paramvalue-prop-contentmodel
',
850 'comment
' => 'apihelp-query+revisions+base-paramvalue-prop-comment
',
851 'parsedcomment
' => 'apihelp-query+revisions+base-paramvalue-prop-parsedcomment
',
852 'content
' => [ 'apihelp-query+revisions+base-paramvalue-prop-content
', $smallLimit ],
853 'tags
' => 'apihelp-query+revisions+base-paramvalue-prop-tags
',
854 'roles
' => 'apihelp-query+revisions+base-paramvalue-prop-roles
',
855 'parsetree
' => [ 'apihelp-query+revisions+base-paramvalue-prop-parsetree
',
856 CONTENT_MODEL_WIKITEXT, $smallLimit ],
858 EnumDef::PARAM_DEPRECATED_VALUES => [
863 ParamValidator::PARAM_TYPE => $slotRoles,
864 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-slots
',
865 ParamValidator::PARAM_ISMULTI => true,
866 ParamValidator::PARAM_ALL => true,
868 'contentformat-{slot}
' => [
869 ApiBase::PARAM_TEMPLATE_VARS => [ 'slot
' => 'slots
' ],
870 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-contentformat-slot
',
871 ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
874 ParamValidator::PARAM_TYPE => 'limit
',
875 IntegerDef::PARAM_MIN => 1,
876 IntegerDef::PARAM_MAX => ApiBase::LIMIT_BIG1,
877 IntegerDef::PARAM_MAX2 => ApiBase::LIMIT_BIG2,
878 ApiBase::PARAM_HELP_MSG => [ 'apihelp-query+revisions+base-param-limit
',
879 $smallLimit, self::LIMIT_PARSE ],
881 'expandtemplates
' => [
882 ParamValidator::PARAM_DEFAULT => false,
883 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-expandtemplates
',
884 ParamValidator::PARAM_DEPRECATED => true,
887 ParamValidator::PARAM_DEFAULT => false,
888 ParamValidator::PARAM_DEPRECATED => true,
889 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-generatexml
',
892 ParamValidator::PARAM_DEFAULT => false,
893 ApiBase::PARAM_HELP_MSG => [ 'apihelp-query+revisions+base-param-parse
', self::LIMIT_PARSE ],
894 ParamValidator::PARAM_DEPRECATED => true,
897 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-section
',
900 ApiBase::PARAM_HELP_MSG => [ 'apihelp-query+revisions+base-param-diffto
', $smallLimit ],
901 ParamValidator::PARAM_DEPRECATED => true,
904 ApiBase::PARAM_HELP_MSG => [ 'apihelp-query+revisions+base-param-difftotext
', $smallLimit ],
905 ParamValidator::PARAM_DEPRECATED => true,
908 ParamValidator::PARAM_DEFAULT => false,
909 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotextpst
',
910 ParamValidator::PARAM_DEPRECATED => true,
913 ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
914 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-contentformat
',
915 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.
$diffto
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.
$slotContentFormats
The number of uncached diffs that had to be generated for this request.
$parseContent
The number of uncached diffs that had to be generated for this request.
$difftotext
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.
$generateXML
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.
$limit
The number of uncached diffs that had to be generated for this request.
parseParameters( $params)
Parse the parameters into the various instance fields.
$needSlots
The number of uncached diffs that had to be generated for this request.
$expandTemplates
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.
$fetchContent
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.
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.
$section
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.
$difftotextpst
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.
bool $fld_size
The number of uncached diffs that had to be generated for this request.
run(ApiPageSet $resultPageSet=null)
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.
$contentFormat
The number of uncached diffs that had to be generated for this request.
extractRevisionInfo(RevisionRecord $revision, $row)
Extract information from the RevisionRecord.
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.
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
A class containing constants representing the names of configuration variables.
Content object for wiki text pages.
Base interface for representing page content.
getSection( $sectionId)
Returns the section with the given ID.
getModel()
Returns the ID of the content model used by this Content object.
serialize( $format=null)
Convenience method for serializing this Content object.
getDefaultFormat()
Convenience method that returns the default serialization format for the content model that this Cont...
isSupportedFormat( $format)
Returns true if $format is a supported serialization format for this Content object,...