Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | array( 'GROUP BY' => 'page_namespace' ), |
36 | 36 | array( 'flaggedpages' => array( 'LEFT JOIN', 'fp_page_id = page_id' ) ) |
37 | 37 | ); |
38 | | - foreach( $ret as $row ) { |
| 38 | + while ( $row = $dbr->fetchObject( $ret ) ) { |
39 | 39 | $ns_total[$row->page_namespace] = (int)$row->total; |
40 | 40 | $ns_reviewed[$row->page_namespace] = (int)$row->reviewed; |
41 | 41 | $ns_synced[$row->page_namespace] = (int)$row->reviewed - (int)$row->pending; |
— | — | @@ -234,7 +234,7 @@ |
235 | 235 | if ( $dbr->numRows($res) ) { |
236 | 236 | $times = array(); |
237 | 237 | # Get the sum of elapsed times |
238 | | - foreach( $res as $row ) { |
| 238 | + while ( $row = $dbr->fetchObject($res) ) { |
239 | 239 | # Reviewed: just subtract the times (flagged - edit made) |
240 | 240 | if ( $row->nft != null ) { |
241 | 241 | $time = wfTimestamp(TS_UNIX,$row->nft) - wfTimestamp(TS_UNIX,$row->rt); |