Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc |
— | — | @@ -211,10 +211,10 @@ |
212 | 212 | # For edits that started off pending, how long do they take to get reviewed? |
213 | 213 | # Edits started off pending if made when a flagged rev of the page already existed. |
214 | 214 | # Get the *first* reviewed rev *after* each edit and get the time difference. |
215 | | - list($revision,$flaggedrevs) = $dbr->tableNamesN('revision','flaggedrevs'); |
| 215 | + list( $revision, $flaggedrevs ) = $dbr->tableNamesN( 'revision', 'flaggedrevs' ); |
216 | 216 | $sql = " |
217 | 217 | SELECT |
218 | | - MIN(rev_timestamp) AS rt, MAX(p.fr_timestamp) AS pft, MIN(n.fr_timestamp) AS nft |
| 218 | + MIN(rev_timestamp) AS rt, MIN(n.fr_timestamp) AS nft, MAX(p.fr_rev_id) |
219 | 219 | FROM $revision |
220 | 220 | INNER JOIN $flaggedrevs AS p FORCE INDEX (PRIMARY) ON |
221 | 221 | (p.fr_page_id = rev_page AND p.fr_rev_id < rev_id AND p.fr_timestamp < rev_timestamp) |