$this->token = $params['token'];
$this->addOption( 'LIMIT', $params['limit'] + 1 );
+ $hookData = [];
$count = 0;
/* Perform the actual query. */
- $res = $this->select( __METHOD__ );
+ $res = $this->select( __METHOD__, [], $hookData );
$revids = [];
$titles = [];
/* Iterate through the rows, adding data extracted from them to our query result. */
foreach ( $res as $row ) {
+ if ( $count === 0 && $resultPageSet !== null ) {
+ // Set the non-continue since the list of recentchanges is
+ // prone to having entries added at the start frequently.
+ $this->getContinuationManager()->addGeneratorNonContinueParam(
+ $this, 'continue', "$row->rc_timestamp|$row->rc_id"
+ );
+ }
if ( ++$count > $params['limit'] ) {
// We've reached the one extra which shows that there are
// additional pages to be had. Stop here...
$vals = $this->extractRowInfo( $row );
/* Add that row's data to our final output. */
- $fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $vals );
+ $fit = $this->processRow( $row, $vals, $hookData ) &&
+ $result->addValue( [ 'query', $this->getModuleName() ], null, $vals );
if ( !$fit ) {
$this->setContinueEnumParameter( 'continue', "$row->rc_timestamp|$row->rc_id" );
break;