X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryRecentChanges.php;h=63e07487da0f15f55b2eb9edb963c15fdeba1976;hb=59ce3456a8007d76875fe8fb21eff4a90b214034;hp=9af4e3e4a2633ee7b4cf19e528f98a48ab5eea16;hpb=34487054ed508a1924832625d9c71dd3960825fc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 9af4e3e4a2..63e07487da 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -287,14 +287,6 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { ); $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 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { } $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 = [];