MediaWiki master
DeletedContribsPager.php
Go to the documentation of this file.
1<?php
22namespace MediaWiki\Pager;
23
34
52 public function __construct(
53 HookContainer $hookContainer,
54 LinkRenderer $linkRenderer,
55 IConnectionProvider $dbProvider,
57 NamespaceInfo $namespaceInfo,
58 CommentFormatter $commentFormatter,
59 LinkBatchFactory $linkBatchFactory,
60 UserFactory $userFactory,
61 IContextSource $context,
62 array $options,
64 ) {
65 $options['isArchive'] = true;
66
67 parent::__construct(
68 $linkRenderer,
69 $linkBatchFactory,
70 $hookContainer,
72 $namespaceInfo,
73 $commentFormatter,
74 $userFactory,
75 $context,
76 $options,
78 );
79
80 $this->revisionIdField = 'ar_rev_id';
81 $this->revisionParentIdField = 'ar_parent_id';
82 $this->revisionTimestampField = 'ar_timestamp';
83 $this->revisionLengthField = 'ar_len';
84 $this->revisionDeletedField = 'ar_deleted';
85 $this->revisionMinorField = 'ar_minor_edit';
86 $this->userNameField = 'ar_user_text';
87 $this->pageNamespaceField = 'ar_namespace';
88 $this->pageTitleField = 'ar_title';
89 }
90
94 protected function getRevisionQuery() {
95 $queryBuilder = $this->revisionStore->newArchiveSelectQueryBuilder( $this->getDatabase() )
96 ->joinComment()
97 ->where( [ 'actor_name' => $this->target ] );
98
99 return $queryBuilder->getQueryInfo();
100 }
101
105 protected function getExtraSortFields() {
106 return [ 'ar_id' ];
107 }
108
109 public function getIndexField() {
110 return 'ar_timestamp';
111 }
112}
113
118class_alias( DeletedContribsPager::class, 'DeletedContribsPager' );
This is the main service interface for converting single-line comments from various DB comment fields...
Class that generates HTML for internal links.
Pager for Special:Contributions.
string $target
User name, or a string describing an IP address range.
__construct(HookContainer $hookContainer, LinkRenderer $linkRenderer, IConnectionProvider $dbProvider, RevisionStore $revisionStore, NamespaceInfo $namespaceInfo, CommentFormatter $commentFormatter, LinkBatchFactory $linkBatchFactory, UserFactory $userFactory, IContextSource $context, array $options, $target)
getRevisionQuery()
Get queryInfo for the main query selecting revisions, not including filtering on namespace,...
getIndexField()
Returns the name of the index field.
getDatabase()
Get the Database object in use.
Service for looking up page revisions.
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Creates User objects.
Interface for objects which can provide a MediaWiki context on request.
Interface for objects representing user identity.
Provide primary and replica IDatabase connections.