I would change the wording here to something other than "periodically" as random is rather opposite
of periodically:
Article.php-2221- if ( 0 == mt_rand( 0, 999 ) ) {
Article.php-2222- # Periodically flush old entries from the recentchanges table.
Article.php:2226: $cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
Article.php-2228- $sql = "DELETE FROM $recentchanges WHERE rc_timestamp < '{$cutoff}'";
Here too:
DefaultSettings.php-1515- /**
DefaultSettings.php-1516- * Recentchanges items are periodically purged; entries older than this many
DefaultSettings.php-1517- * seconds will go.
DefaultSettings.php-1518- * For one week : 7 * 24 * 3600
DefaultSettings.php-1519- */
DefaultSettings.php:1520: $wgRCMaxAge = 7 * 24 * 3600;
RecentChange.php-158- # Don't bother looking for entries that have probably
RecentChange.php-159- # been purged, it just locks up the indexes needlessly.
RecentChange.php:160: global $wgRCMaxAge;
RecentChange.php-161- $age = time() - wfTimestamp( TS_UNIX, $lastTime );
RecentChange.php:162: if( $age < $wgRCMaxAge ) {
RecentChange.php-163- # live hack, will commit once tested - kate
RecentChange.php-164- # Update rc_this_oldid for the entries which were current
Sure hope in Special:Recentchanges you then consider $wgRCMaxAge
before offering all of the presently hardwired "1 | 3 | 7 | 14 | 30
days". I.e., rcDayLimitLinks() should consider $wgRCMaxAge.
Currently it seems according to the code that 14, 30 results will one
day get truncated unexpectedly on smaller wikis out of the blue,
slowly growing back until one day truncated again. Just another case
of assuming big busy wikis.
Smaller wikis must set
$wgRCMaxAge = 30 * 24 * 3600;
or else users will wonder why suddenly one day 14, 30 results become 7.
Version: 1.16.x
Severity: minor