Use getArchiveQueryInfo in DeletedContribsPager.
Bug: T282844 Change-Id: I32b7462f444f24dd3171cb3a6ecff97f68379313
This commit is contained in:
parent
c4243afa47
commit
bf3951c91b
2 changed files with 10 additions and 24 deletions
|
|
@ -65,7 +65,7 @@ interface RevisionFactory extends IDBAccessObject {
|
|||
* revision, slot, and content tables defined for MCR since MW1.31.
|
||||
*
|
||||
* @param \stdClass $row A query result row as a raw object.
|
||||
* Use RevisionStore::getQueryInfo() to build a query that yields the required fields.
|
||||
* Use getQueryInfo() to build a query that yields the required fields.
|
||||
* @param int $queryFlags Flags for lazy loading behavior, see IDBAccessObject::READ_XXX.
|
||||
* @param PageIdentity|null $page A page object for the revision.
|
||||
*
|
||||
|
|
@ -88,8 +88,7 @@ interface RevisionFactory extends IDBAccessObject {
|
|||
* MCR migration note: this replaces Revision::newFromArchiveRow
|
||||
*
|
||||
* @param \stdClass $row A query result row as a raw object.
|
||||
* Use RevisionStore::getArchiveQueryInfo() to build a query that yields the
|
||||
* required fields.
|
||||
* Use getArchiveQueryInfo() to build a query that yields the required fields.
|
||||
* @param int $queryFlags Flags for lazy loading behavior, see IDBAccessObject::READ_XXX.
|
||||
* @param PageIdentity|null $page
|
||||
* @param array $overrides An associative array that allows fields in $row to be overwritten.
|
||||
|
|
|
|||
|
|
@ -120,28 +120,15 @@ class DeletedContribsPager extends IndexPager {
|
|||
' != ' . RevisionRecord::SUPPRESSED_USER;
|
||||
}
|
||||
|
||||
$commentQuery = $this->commentStore->getJoin( 'ar_comment' );
|
||||
$queryInfo = $this->revisionFactory->getArchiveQueryInfo();
|
||||
$queryInfo['conds'] = $conds;
|
||||
$queryInfo['options'] = [];
|
||||
|
||||
return [
|
||||
'tables' => [ 'archive', 'actor' ] + $commentQuery['tables'],
|
||||
'fields' => [
|
||||
'ar_rev_id',
|
||||
'ar_id',
|
||||
'ar_namespace',
|
||||
'ar_title',
|
||||
'ar_actor',
|
||||
'ar_timestamp',
|
||||
'ar_minor_edit',
|
||||
'ar_deleted',
|
||||
'ar_user' => 'actor_user',
|
||||
'ar_user_text' => 'actor_name',
|
||||
] + $commentQuery['fields'],
|
||||
'conds' => $conds,
|
||||
'options' => [],
|
||||
'join_conds' => [
|
||||
'actor' => [ 'JOIN', 'actor_id=ar_actor' ]
|
||||
] + $commentQuery['joins'],
|
||||
];
|
||||
// rename the "joins" field to "join_conds" as expected by the base class.
|
||||
$queryInfo['join_conds'] = $queryInfo['joins'];
|
||||
unset( $queryInfo['joins'] );
|
||||
|
||||
return $queryInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue