From 2e75ac4bd40708b412d3b17b889f8778f52c8c27 Mon Sep 17 00:00:00 2001 From: Amir Sarabadani Date: Tue, 27 Nov 2018 18:20:20 +0100 Subject: [PATCH] Migrate WatchedItemQueryService from tag_summary to change_tag Bug: T209525 Change-Id: I3984355b126c2e36b53f697c26888c1361fdf6af --- includes/watcheditem/WatchedItemQueryService.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/includes/watcheditem/WatchedItemQueryService.php b/includes/watcheditem/WatchedItemQueryService.php index 17d9b91ac0..95b4cb49ed 100644 --- a/includes/watcheditem/WatchedItemQueryService.php +++ b/includes/watcheditem/WatchedItemQueryService.php @@ -340,9 +340,6 @@ class WatchedItemQueryService { if ( in_array( self::INCLUDE_COMMENT, $options['includeFields'] ) ) { $tables += $this->commentStore->getJoin( 'rc_comment' )['tables']; } - if ( in_array( self::INCLUDE_TAGS, $options['includeFields'] ) ) { - $tables[] = 'tag_summary'; - } if ( in_array( self::INCLUDE_USER, $options['includeFields'] ) || in_array( self::INCLUDE_USER_ID, $options['includeFields'] ) || in_array( self::FILTER_ANON, $options['filters'] ) || @@ -402,7 +399,7 @@ class WatchedItemQueryService { } if ( in_array( self::INCLUDE_TAGS, $options['includeFields'] ) ) { // prefixed with rc_ to include the field in getRecentChangeFieldsFromRow - $fields['rc_tags'] = 'ts_tags'; + $fields['rc_tags'] = ChangeTags::makeTagSummarySubquery( 'recentchanges' ); } return $fields; @@ -710,9 +707,6 @@ class WatchedItemQueryService { if ( in_array( self::INCLUDE_COMMENT, $options['includeFields'] ) ) { $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' ] ]; - } if ( in_array( self::INCLUDE_USER, $options['includeFields'] ) || in_array( self::INCLUDE_USER_ID, $options['includeFields'] ) || in_array( self::FILTER_ANON, $options['filters'] ) || -- 2.20.1