r52967 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52966‎ | r52967 | r52968 >
Date:04:39, 9 July 2009
Author:aaron
Status:ok
Tags:
Comment:
backport r52962
Modified paths:
  • /branches/REL1_15/extensions/FlaggedRevs/maintenance/updateAutoPromote.inc (modified) (history)

Diff [purge]

Index: branches/REL1_15/extensions/FlaggedRevs/maintenance/updateAutoPromote.inc
@@ -3,7 +3,7 @@
44
55 function update_autopromote() {
66 global $wgContentNamespaces, $wgFlaggedRevsAutopromote;
7 - $batchSize = 25;
 7+ $batchSize = 20;
88 echo "Populating and updating flaggedrevs_promote table\n";
99
1010 $db = wfGetDB( DB_SLAVE );
@@ -50,7 +50,11 @@
5151 __METHOD__,
5252 array( 'LIMIT' => max($wgFlaggedRevsAutopromote['uniqueContentPages'],50) )
5353 );
54 - $p['uniqueContentPages'] = $db->numRows( $sres );
 54+ $uniquePages = array();
 55+ foreach( $sres as $row ) {
 56+ $uniquePages[] = $row->rev_page;
 57+ }
 58+ $p['uniqueContentPages'] = implode($uniquePages,',');
5559
5660 if( $oldp != $p ) {
5761 FlaggedRevs::saveUserParams( $user->getId(), $p );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52962Fixed totally broken $p['uniqueContentPages'] handlingaaron03:15, 9 July 2009

Status & tagging log