MediaWiki master
DeletedContribsPager.php
Go to the documentation of this file.
1<?php
22namespace MediaWiki\Pager;
23
34
39 public function __construct(
40 HookContainer $hookContainer,
41 LinkRenderer $linkRenderer,
42 IConnectionProvider $dbProvider,
45 CommentFormatter $commentFormatter,
46 LinkBatchFactory $linkBatchFactory,
47 UserFactory $userFactory,
48 IContextSource $context,
49 array $options,
51 ) {
52 $options['isArchive'] = true;
53
54 parent::__construct(
55 $linkRenderer,
56 $linkBatchFactory,
57 $hookContainer,
60 $commentFormatter,
61 $userFactory,
62 $context,
63 $options,
65 );
66
67 $this->revisionIdField = 'ar_rev_id';
68 $this->revisionParentIdField = 'ar_parent_id';
69 $this->revisionTimestampField = 'ar_timestamp';
70 $this->revisionLengthField = 'ar_len';
71 $this->revisionDeletedField = 'ar_deleted';
72 $this->revisionMinorField = 'ar_minor_edit';
73 $this->userNameField = 'ar_user_text';
74 $this->pageNamespaceField = 'ar_namespace';
75 $this->pageTitleField = 'ar_title';
76 }
77
81 protected function getRevisionQuery() {
82 $queryBuilder = $this->revisionStore->newArchiveSelectQueryBuilder( $this->getDatabase() )
83 ->joinComment()
84 ->where( [ 'actor_name' => $this->target ] );
85
86 return $queryBuilder->getQueryInfo();
87 }
88
92 protected function getExtraSortFields() {
93 return [ 'ar_id' ];
94 }
95
96 public function getIndexField() {
97 return 'ar_timestamp';
98 }
99}
100
105class_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, UserIdentity $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...
Create 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.