+ /**
+ * Not expensive, this class won't work properly with the caching system anyway
+ */
+ function isExpensive() {
+ return false;
+ }
+
+ /**
+ * Fetch user page links and cache their existence
+ */
+ function preprocessResults( &$db, &$res ) {
+ $batch = new LinkBatch;
+ while ( $row = $db->fetchObject( $res ) ) {
+ $batch->addObj( Title::makeTitleSafe( $row->namespace, $row->title ) );
+ }
+ $batch->execute();
+
+ // Back to start for display
+ if( $db->numRows( $res ) > 0 ) {
+ // If there are no rows we get an error seeking.
+ $db->dataSeek( $res, 0 );
+ }
+ }
+