Index: trunk/phase3/includes/SpecialWantedcategories.php |
— | — | @@ -43,6 +43,23 @@ |
44 | 44 | |
45 | 45 | function sortDescending() { return true; } |
46 | 46 | |
| 47 | + /** |
| 48 | + * Fetch user page links and cache their existence |
| 49 | + */ |
| 50 | + function preprocessResults( &$db, &$res ) { |
| 51 | + global $wgLinkCache; |
| 52 | + |
| 53 | + $batch = new LinkBatch; |
| 54 | + while ( $row = $db->fetchObject( $res ) ) |
| 55 | + $batch->addObj( Title::makeTitleSafe( $row->namespace, $row->title ) ); |
| 56 | + $batch->execute( $wgLinkCache ); |
| 57 | + |
| 58 | + // Back to start for display |
| 59 | + if ( $db->numRows( $res ) > 0 ) |
| 60 | + // If there are no rows we get an error seeking. |
| 61 | + $db->dataSeek( $res, 0 ); |
| 62 | + } |
| 63 | + |
47 | 64 | function formatResult( $skin, $result ) { |
48 | 65 | global $wgContLang; |
49 | 66 | |