If the user requested a timestamp offset far in the past such that
there are no edits by users with user_ids in the range, we would end
up scanning all revisions from that offset until start of time.
This might end up generating funny queries with redundant conditions
on rev_timestamp, but that should not be a problem, and trying to
tweak paging logic would probably be more difficult than this.
Bug: T140537
Change-Id: I2ac9abee09529620588923bbafbcac07ebe466b2
]
];
}
+ // (T140537) Disallow looking too far in the past for 'newbies' queries. If the user requested
+ // a timestamp offset far in the past such that there are no edits by users with user_ids in
+ // the range, we would end up scanning all revisions from that offset until start of time.
+ $condition[] = 'rev_timestamp > ' .
+ $this->mDb->addQuotes( $this->mDb->timestamp( wfTimestamp() - 30 * 24 * 60 * 60 ) );
} else {
$uid = User::idFromName( $this->target );
if ( $uid ) {