Index: trunk/extensions/FlaggedRevs/specialpages/OldReviewedPages_body.php |
— | — | @@ -269,10 +269,12 @@ |
270 | 270 | $conds = $this->mConds; |
271 | 271 | $tables = array( 'flaggedpages', 'page', 'revision' ); |
272 | 272 | $fields = array('page_namespace','page_title','page_len','fp_stable','fp_quality', |
273 | | - 'fp_page_id','fp_pending_since','rev_len'); |
| 273 | + 'fp_pending_since','rev_len'); |
274 | 274 | $conds[] = 'page_id = fp_page_id'; |
| 275 | + # Overconstrain rev_page to force PK use |
275 | 276 | $conds[] = 'rev_page = fp_page_id AND rev_id = fp_stable'; |
276 | 277 | $conds[] = 'fp_pending_since IS NOT NULL'; |
| 278 | + # Filter namespace |
277 | 279 | $conds['page_namespace'] = $this->namespace; |
278 | 280 | $useIndex = array('flaggedpages' => 'fp_pending_since','page' => 'PRIMARY'); |
279 | 281 | # Filter by category |