r78449 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78448‎ | r78449 | r78450 >
Date:20:42, 15 December 2010
Author:aaron
Status:deferred
Tags:
Comment:
Use query() rather than should-be private doQuery()
Modified paths:
  • /trunk/extensions/FlaggedRevs/maintenance/updateStats.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc
@@ -227,14 +227,14 @@
228228 ((rev_user = 0) AND ($timeCondition) AND ((rev_id % $mod) = 0))
229229 GROUP BY rev_id";
230230 # Actually run the query...
231 - $res = $dbr->doQuery( $sql, __METHOD__ );
 231+ $res = $dbr->query( $sql, __METHOD__ );
232232 $secondsR = 0; // total wait seconds for edits later reviewed
233233 $secondsP = 0; // total wait seconds for edits still pending
234234 $aveRT = $medianRT = 0;
235 - if ( $dbr->numRows($res) ) {
 235+ if ( $dbr->numRows( $res ) ) {
236236 $times = array();
237237 # Get the sum of elapsed times
238 - while ( $row = $dbr->fetchObject($res) ) {
 238+ foreach( $res as $row ) {
239239 # Reviewed: just subtract the times (flagged - edit made)
240240 if ( $row->nft != null ) {
241241 $time = wfTimestamp(TS_UNIX,$row->nft) - wfTimestamp(TS_UNIX,$row->rt);

Status & tagging log