LanguageConverter variant. This allows English-speaking developers
to develop and test LanguageConverter more easily. Pig Latin can be
enabled by setting $wgUsePigLatinVariant to true.
+* Added RecentChangesPurgeRows hook to allow extensions to purge data that
+ depends on the recentchanges table.
=== Languages updated in 1.30 ===
'RecentChange_save': Called at the end of RecentChange::save().
&$recentChange: RecentChange object
+'RecentChangesPurgeRows': Called when old recentchanges rows are purged, after
+deleting those rows but within the same transaction.
+$rows: The deleted rows as an array of recentchanges row objects (with up to
+ $wgUpdateRowsPerQuery items).
+
'RedirectSpecialArticleRedirectParams': Lets you alter the set of parameter
names such as "oldid" that are preserved when using redirecting special pages
such as Special:MyPage and Special:MyTalk.
$ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
$cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
do {
- $rcIds = $dbw->selectFieldValues( 'recentchanges',
- 'rc_id',
+ $rcIds = [];
+ $rows = [];
+ $res = $dbw->select( 'recentchanges',
+ RecentChange::selectFields(),
[ 'rc_timestamp < ' . $dbw->addQuotes( $cutoff ) ],
__METHOD__,
[ 'LIMIT' => $wgUpdateRowsPerQuery ]
);
+ foreach ( $res as $row ) {
+ $rcIds[] = $row->rc_id;
+ $rows[] = $row;
+ }
if ( $rcIds ) {
$dbw->delete( 'recentchanges', [ 'rc_id' => $rcIds ], __METHOD__ );
+ Hooks::run( 'RecentChangesPurgeRows', [ $rows ] );
// There might be more, so try waiting for replica DBs
try {
$factory->commitAndWaitForReplication(