$loadBalancer ? $loadBalancer : $this->getMockLoadBalancer(),
$blobStore ? $blobStore : $this->getMockSqlBlobStore(),
$WANObjectCache ? $WANObjectCache : $this->getHashWANObjectCache(),
- MediaWikiServices::getInstance()->getCommentStore()
+ MediaWikiServices::getInstance()->getCommentStore(),
+ MediaWikiServices::getInstance()->getActorMigration()
);
}
'rev_page',
'rev_text_id',
'rev_timestamp',
- 'rev_user_text',
- 'rev_user',
'rev_minor_edit',
'rev_deleted',
'rev_len',
];
}
+ private function getActorQueryFields() {
+ return [
+ 'rev_user' => 'rev_user',
+ 'rev_user_text' => 'rev_user_text',
+ 'rev_actor' => 'NULL',
+ ];
+ }
+
private function getContentHandlerQueryFields() {
return [
'rev_content_format',
'fields' => array_merge(
$this->getDefaultQueryFields(),
$this->getCommentQueryFields(),
+ $this->getActorQueryFields(),
$this->getContentHandlerQueryFields()
),
'joins' => [],
'tables' => [ 'revision' ],
'fields' => array_merge(
$this->getDefaultQueryFields(),
- $this->getCommentQueryFields()
+ $this->getCommentQueryFields(),
+ $this->getActorQueryFields()
),
'joins' => [],
]
'fields' => array_merge(
$this->getDefaultQueryFields(),
$this->getCommentQueryFields(),
+ $this->getActorQueryFields(),
[
'page_namespace',
'page_title',
'fields' => array_merge(
$this->getDefaultQueryFields(),
$this->getCommentQueryFields(),
+ $this->getActorQueryFields(),
[
'user_name',
]
'fields' => array_merge(
$this->getDefaultQueryFields(),
$this->getCommentQueryFields(),
+ $this->getActorQueryFields(),
[
'old_text',
'old_flags',
'fields' => array_merge(
$this->getDefaultQueryFields(),
$this->getCommentQueryFields(),
+ $this->getActorQueryFields(),
$this->getContentHandlerQueryFields(),
[
'page_namespace',
*/
public function testGetQueryInfo( $contentHandlerUseDb, $options, $expected ) {
$this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_OLD );
+ $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', MIGRATION_OLD );
$this->overrideMwServices();
$store = $this->getRevisionStore();
$store->setContentHandlerUseDB( $contentHandlerUseDb );
'ar_text',
'ar_text_id',
'ar_timestamp',
- 'ar_user_text',
- 'ar_user',
'ar_minor_edit',
'ar_deleted',
'ar_len',
*/
public function testGetArchiveQueryInfo_contentHandlerDb() {
$this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_OLD );
+ $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', MIGRATION_OLD );
$this->overrideMwServices();
$store = $this->getRevisionStore();
$store->setContentHandlerUseDB( true );
'ar_comment_text' => 'ar_comment',
'ar_comment_data' => 'NULL',
'ar_comment_cid' => 'NULL',
+ 'ar_user_text' => 'ar_user_text',
+ 'ar_user' => 'ar_user',
+ 'ar_actor' => 'NULL',
'ar_content_format',
'ar_content_model',
]
*/
public function testGetArchiveQueryInfo_noContentHandlerDb() {
$this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_OLD );
+ $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', MIGRATION_OLD );
$this->overrideMwServices();
$store = $this->getRevisionStore();
$store->setContentHandlerUseDB( false );
'ar_comment_text' => 'ar_comment',
'ar_comment_data' => 'NULL',
'ar_comment_cid' => 'NULL',
+ 'ar_user_text' => 'ar_user_text',
+ 'ar_user' => 'ar_user',
+ 'ar_actor' => 'NULL',
]
),
'joins' => [],