jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/376589 )
Change subject: ApiQueryRecentChanges: Fetch comment fields if rctoken is used ...................................................................... ApiQueryRecentChanges: Fetch comment fields if rctoken is used When the deprecated rctoken parameter is used, the module calls RecentChange::newFromRow(), which now requires that the comment fields be present. Bug: T175307 Change-Id: Ida025f419e43809c34fff386f1a1ee8881393b80 --- M includes/api/ApiQueryRecentChanges.php 1 file changed, 9 insertions(+), 8 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 9af4e3e..63e0748 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -287,14 +287,6 @@ ); $showRedirects = $this->fld_redirect || isset( $show['redirect'] ) || isset( $show['!redirect'] ); - - if ( $this->fld_comment || $this->fld_parsedcomment ) { - $this->commentStore = new CommentStore( 'rc_comment' ); - $commentQuery = $this->commentStore->getJoin(); - $this->addTables( $commentQuery['tables'] ); - $this->addFields( $commentQuery['fields'] ); - $this->addJoinConds( $commentQuery['joins'] ); - } } $this->addFieldsIf( [ 'rc_this_oldid' ], $resultPageSet && $params['generaterevisions'] ); @@ -360,6 +352,15 @@ } $this->token = $params['token']; + + if ( $this->fld_comment || $this->fld_parsedcomment || $this->token ) { + $this->commentStore = new CommentStore( 'rc_comment' ); + $commentQuery = $this->commentStore->getJoin(); + $this->addTables( $commentQuery['tables'] ); + $this->addFields( $commentQuery['fields'] ); + $this->addJoinConds( $commentQuery['joins'] ); + } + $this->addOption( 'LIMIT', $params['limit'] + 1 ); $hookData = []; -- To view, visit https://gerrit.wikimedia.org/r/376589 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida025f419e43809c34fff386f1a1ee8881393b80 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie <bjor...@wikimedia.org> Gerrit-Reviewer: Chad <ch...@wikimedia.org> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits