const INCLUDE_PATROL_INFO = 'patrol';
const INCLUDE_SIZES = 'sizes';
const INCLUDE_LOG_INFO = 'loginfo';
const INCLUDE_PATROL_INFO = 'patrol';
const INCLUDE_SIZES = 'sizes';
const INCLUDE_LOG_INFO = 'loginfo';
// FILTER_* constants are part of public API (are used in ApiQueryWatchlist and
// ApiQueryWatchlistRaw classes) and should not be changed.
// FILTER_* constants are part of public API (are used in ApiQueryWatchlist and
// ApiQueryWatchlistRaw classes) and should not be changed.
- public function __construct( LoadBalancer $loadBalancer ) {
+ public function __construct(
+ LoadBalancer $loadBalancer,
+ CommentStore $commentStore
+ ) {
- $tables += $this->getCommentStore()->getJoin()['tables'];
+ $tables += $this->commentStore->getJoin( 'rc_comment' )['tables'];
+ }
+ if ( in_array( self::INCLUDE_TAGS, $options['includeFields'] ) ) {
+ $tables[] = 'tag_summary';
}
if ( in_array( self::INCLUDE_PATROL_INFO, $options['includeFields'] ) ) {
$fields = array_merge( $fields, [ 'rc_patrolled', 'rc_log_type' ] );
}
if ( in_array( self::INCLUDE_PATROL_INFO, $options['includeFields'] ) ) {
$fields = array_merge( $fields, [ 'rc_patrolled', 'rc_log_type' ] );
if ( in_array( self::INCLUDE_LOG_INFO, $options['includeFields'] ) ) {
$fields = array_merge( $fields, [ 'rc_logid', 'rc_log_type', 'rc_log_action', 'rc_params' ] );
}
if ( in_array( self::INCLUDE_LOG_INFO, $options['includeFields'] ) ) {
$fields = array_merge( $fields, [ 'rc_logid', 'rc_log_type', 'rc_log_action', 'rc_params' ] );
}
$joinConds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
}
if ( in_array( self::INCLUDE_COMMENT, $options['includeFields'] ) ) {
$joinConds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
}
if ( in_array( self::INCLUDE_COMMENT, $options['includeFields'] ) ) {
- $joinConds += $this->getCommentStore()->getJoin()['joins'];
+ $joinConds += $this->commentStore->getJoin( 'rc_comment' )['joins'];
+ }
+ if ( in_array( self::INCLUDE_TAGS, $options['includeFields'] ) ) {
+ $joinConds['tag_summary'] = [ 'LEFT JOIN', [ 'rc_id=ts_rc_id' ] ];