<?php
+
namespace MediaWiki\Tests\Revision;
use MediaWiki\MediaWikiServices;
$this->getNewCommentQueryFields( 'rev' )
),
'joins' => [
- 'page' => [ 'INNER JOIN', [ 'page_id = rev_page' ] ],
+ 'page' => [ 'JOIN', [ 'page_id = rev_page' ] ],
'user' => [
'LEFT JOIN',
[ 'actor_rev_user.actor_user != 0', 'user_id = actor_rev_user.actor_user' ],
),
'joins' => array_merge(
[
- 'page' => [ 'INNER JOIN', [ 'page_id = rev_page' ] ],
+ 'page' => [ 'JOIN', [ 'page_id = rev_page' ] ],
'user' => [
'LEFT JOIN',
[
),
'joins' => array_merge(
[
- 'page' => [ 'INNER JOIN', [ 'page_id = rev_page' ] ],
+ 'page' => [ 'JOIN', [ 'page_id = rev_page' ] ],
'user' => [
'LEFT JOIN',
[
),
'joins' => array_merge(
[
- 'page' => [ 'INNER JOIN', [ 'page_id = rev_page' ] ],
+ 'page' => [ 'JOIN', [ 'page_id = rev_page' ] ],
'user' => [
'LEFT JOIN',
[
$this->getNewCommentQueryFields( 'rev' )
),
'joins' => [
- 'page' => [ 'INNER JOIN', [ 'page_id = rev_page' ] ],
+ 'page' => [ 'JOIN', [ 'page_id = rev_page' ] ],
'user' => [ 'LEFT JOIN', [ 'rev_user != 0', 'user_id = rev_user' ] ],
'temp_rev_comment' => [ 'JOIN', 'temp_rev_comment.revcomment_rev = rev_id' ],
'comment_rev_comment'
$this->getNewCommentQueryFields( 'rev' )
),
'joins' => [
- 'page' => [ 'INNER JOIN', [ 'page_id = rev_page' ], ],
+ 'page' => [ 'JOIN', [ 'page_id = rev_page' ], ],
'temp_rev_comment' => [ 'JOIN', 'temp_rev_comment.revcomment_rev = rev_id' ],
'comment_rev_comment'
=> [ 'JOIN', 'comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id' ],
$this->getNewCommentQueryFields( 'rev' )
),
'joins' => [
- 'text' => [ 'INNER JOIN', [ 'rev_text_id=old_id' ] ],
+ 'text' => [ 'JOIN', [ 'rev_text_id=old_id' ] ],
'temp_rev_comment' => [ 'JOIN', 'temp_rev_comment.revcomment_rev = rev_id' ],
'comment_rev_comment'
=> [ 'JOIN', 'comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id' ],
),
'joins' => [
'page' => [
- 'INNER JOIN',
+ 'JOIN',
[ 'page_id = rev_page' ],
],
'user' => [
],
],
'text' => [
- 'INNER JOIN',
+ 'JOIN',
[ 'rev_text_id=old_id' ],
],
'temp_rev_comment' => [ 'JOIN', 'temp_rev_comment.revcomment_rev = rev_id' ],
'content_model',
],
'joins' => [
- 'content' => [ 'INNER JOIN', [ 'slot_content_id = content_id' ] ],
+ 'content' => [ 'JOIN', [ 'slot_content_id = content_id' ] ],
],
]
];
'model_name',
],
'joins' => [
- 'content' => [ 'INNER JOIN', [ 'slot_content_id = content_id' ] ],
+ 'content' => [ 'JOIN', [ 'slot_content_id = content_id' ] ],
'content_models' => [ 'LEFT JOIN', [ 'content_model = model_id' ] ],
],
]
[],
[
'tables' => [
- 'slots' => 'revision',
+ 'revision',
],
'fields' => array_merge(
[
- 'slot_revision_id' => 'slots.rev_id',
+ 'slot_revision_id' => 'rev_id',
'slot_content_id' => 'NULL',
- 'slot_origin' => 'slots.rev_id',
+ 'slot_origin' => 'rev_id',
'role_name' => $db->addQuotes( SlotRecord::MAIN ),
]
),
[ 'content' ],
[
'tables' => [
- 'slots' => 'revision',
+ 'revision',
],
'fields' => array_merge(
[
- 'slot_revision_id' => 'slots.rev_id',
+ 'slot_revision_id' => 'rev_id',
'slot_content_id' => 'NULL',
- 'slot_origin' => 'slots.rev_id',
+ 'slot_origin' => 'rev_id',
'role_name' => $db->addQuotes( SlotRecord::MAIN ),
- 'content_size' => 'slots.rev_len',
- 'content_sha1' => 'slots.rev_sha1',
+ 'content_size' => 'rev_len',
+ 'content_sha1' => 'rev_sha1',
'content_address' => $db->buildConcat( [
- $db->addQuotes( 'tt:' ), 'slots.rev_text_id' ] ),
- 'model_name' => 'slots.rev_content_model',
+ $db->addQuotes( 'tt:' ), 'rev_text_id' ] ),
+ 'rev_text_id' => 'rev_text_id',
+ 'model_name' => 'rev_content_model',
]
),
'joins' => [],
[ 'content', 'model', 'role' ],
[
'tables' => [
- 'slots' => 'revision',
+ 'revision',
],
'fields' => array_merge(
[
- 'slot_revision_id' => 'slots.rev_id',
+ 'slot_revision_id' => 'rev_id',
'slot_content_id' => 'NULL',
- 'slot_origin' => 'slots.rev_id',
+ 'slot_origin' => 'rev_id',
'role_name' => $db->addQuotes( SlotRecord::MAIN ),
- 'content_size' => 'slots.rev_len',
- 'content_sha1' => 'slots.rev_sha1',
+ 'content_size' => 'rev_len',
+ 'content_sha1' => 'rev_sha1',
'content_address' => $db->buildConcat( [
- $db->addQuotes( 'tt:' ), 'slots.rev_text_id' ] ),
- 'model_name' => 'slots.rev_content_model',
+ $db->addQuotes( 'tt:' ), 'rev_text_id' ] ),
+ 'rev_text_id' => 'rev_text_id',
+ 'model_name' => 'rev_content_model',
]
),
'joins' => [],
[],
[
'tables' => [
- 'slots' => 'revision',
+ 'revision',
],
'fields' => array_merge(
[
- 'slot_revision_id' => 'slots.rev_id',
+ 'slot_revision_id' => 'rev_id',
'slot_content_id' => 'NULL',
- 'slot_origin' => 'slots.rev_id',
+ 'slot_origin' => 'rev_id',
'role_name' => $db->addQuotes( SlotRecord::MAIN ),
]
),
[ 'content' ],
[
'tables' => [
- 'slots' => 'revision',
+ 'revision',
],
'fields' => array_merge(
[
- 'slot_revision_id' => 'slots.rev_id',
+ 'slot_revision_id' => 'rev_id',
'slot_content_id' => 'NULL',
- 'slot_origin' => 'slots.rev_id',
+ 'slot_origin' => 'rev_id',
'role_name' => $db->addQuotes( SlotRecord::MAIN ),
- 'content_size' => 'slots.rev_len',
- 'content_sha1' => 'slots.rev_sha1',
+ 'content_size' => 'rev_len',
+ 'content_sha1' => 'rev_sha1',
'content_address' =>
- $db->buildConcat( [ $db->addQuotes( 'tt:' ), 'slots.rev_text_id' ] ),
- 'model_name' => 'slots.rev_content_model',
+ $db->buildConcat( [ $db->addQuotes( 'tt:' ), 'rev_text_id' ] ),
+ 'rev_text_id' => 'rev_text_id',
+ 'model_name' => 'rev_content_model',
]
),
'joins' => [],
public function testRevisionPageJoinCond() {
$this->hideDeprecated( 'Revision::pageJoinCond' );
$this->assertEquals(
- [ 'INNER JOIN', [ 'page_id = rev_page' ] ],
+ [ 'JOIN', [ 'page_id = rev_page' ] ],
Revision::pageJoinCond()
);
}