Index: trunk/extensions/FlaggedRevs/maintenance/updateAutoPromote.inc |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | |
5 | 5 | function update_autopromote() { |
6 | 6 | global $wgContentNamespaces, $wgFlaggedRevsAutopromote; |
7 | | - $batchSize = 25; |
| 7 | + $batchSize = 20; |
8 | 8 | echo "Populating and updating flaggedrevs_promote table\n"; |
9 | 9 | |
10 | 10 | $db = wfGetDB( DB_SLAVE ); |
— | — | @@ -50,7 +50,11 @@ |
51 | 51 | __METHOD__, |
52 | 52 | array( 'LIMIT' => max($wgFlaggedRevsAutopromote['uniqueContentPages'],50) ) |
53 | 53 | ); |
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,','); |
55 | 59 | |
56 | 60 | if( $oldp != $p ) { |
57 | 61 | FlaggedRevs::saveUserParams( $user->getId(), $p ); |