dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "mw.htmlform: Fix hiding of the textbox for 'selectorother' fields on page...
[lhc/web/wiklou.git]
/
includes
/
jobqueue
/
jobs
/
RecentChangesUpdateJob.php
diff --git
a/includes/jobqueue/jobs/RecentChangesUpdateJob.php
b/includes/jobqueue/jobs/RecentChangesUpdateJob.php
index
c123619
..
6f349d4
100644
(file)
--- a/
includes/jobqueue/jobs/RecentChangesUpdateJob.php
+++ b/
includes/jobqueue/jobs/RecentChangesUpdateJob.php
@@
-16,7
+16,6
@@
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @author Aaron Schulz
* @ingroup JobQueue
*/
use MediaWiki\MediaWikiServices;
* @ingroup JobQueue
*/
use MediaWiki\MediaWikiServices;
@@
-87,14
+86,21
@@
class RecentChangesUpdateJob extends Job {
$ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
$cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
do {
$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 ]
);
[ '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__ );
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(
// There might be more, so try waiting for replica DBs
try {
$factory->commitAndWaitForReplication(
@@
-231,7
+237,6
@@
class RecentChangesUpdateJob extends Job {
],
__METHOD__
);
],
__METHOD__
);
-
},
__METHOD__
);
},
__METHOD__
);