- rc_namespace AS namespace,
- rc_title AS title,
- rc_cur_id AS value,
-
- rc_user AS user,
- rc_user_text AS user_text,
- rc_comment as comment,
- rc_timestamp AS timestamp,
- length(cur_text) as length,
- cur_text as text
- FROM $recentchanges,$cur
- WHERE rc_cur_id=cur_id AND rc_new=1
- AND rc_namespace=0 AND cur_is_redirect=0";
+ rc_namespace AS namespace,
+ rc_title AS title,
+ rc_cur_id AS cur_id,
+ rc_user AS \"user\",
+ rc_user_text AS user_text,
+ rc_comment as \"comment\",
+ rc_timestamp AS timestamp,
+ rc_timestamp AS value,
+ '{$usepatrol}' as usepatrol,
+ rc_patrolled AS patrolled,
+ rc_id AS rcid,
+ page_len as length,
+ page_latest as rev_id
+ FROM $recentchanges,$page
+ WHERE rc_cur_id=page_id AND rc_new=1
+ {$nsfilter}
+ AND page_is_redirect = 0
+ {$uwhere}";
+ }
+
+ function preprocessResults( &$dbo, &$res ) {
+ # Do a batch existence check on the user and talk pages
+ $linkBatch = new LinkBatch();
+ while( $row = $dbo->fetchObject( $res ) ) {
+ $linkBatch->addObj( Title::makeTitleSafe( NS_USER, $row->user_text ) );
+ $linkBatch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_text ) );
+ }
+ $linkBatch->execute();
+ # Seek to start
+ if( $dbo->numRows( $res ) > 0 )
+ $dbo->dataSeek( $res, 0 );