- $sql = "SELECT page_id,page_namespace,page_title,rev_user,rev_comment," .
- "rev_user_text,rev_timestamp,rev_minor_edit,page_is_new FROM $categorylinks, $revision, $page " .
- "WHERE rev_timestamp > '{$cutoff}' {$cmq} AND cl_from=page_id AND cl_to=$catkey " .
- "GROUP BY page_id,page_namespace,page_title,rev_user,rev_comment,rev_user_text," .
- "rev_timestamp,rev_minor_edit,page_is_new ORDER BY rev_timestamp DESC LIMIT {$limit}";
+ $sql = "SELECT /* wfSpecialRecentchangeslinked */
+ rc_id,
+ rc_cur_id,
+ rc_namespace,
+ rc_title,
+ rc_this_oldid,
+ rc_last_oldid,
+ rc_user,
+ rc_comment,
+ rc_user_text,
+ rc_timestamp,
+ rc_minor,
+ rc_new,
+ rc_patrolled,
+ rc_type
+" . ($uid ? ",wl_user" : "") . "
+ FROM $categorylinks, $recentchanges
+" . ($uid ? "LEFT OUTER JOIN $watchlist ON wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace " : "") . "
+ WHERE rc_timestamp > '{$cutoff}'
+ {$cmq}
+ AND cl_from=rc_cur_id
+ AND cl_to=$catkey
+ GROUP BY rc_cur_id,rc_namespace,rc_title,
+ rc_user,rc_comment,rc_user_text,rc_timestamp,rc_minor,
+ rc_new
+ ORDER BY rc_timestamp DESC
+ LIMIT {$limit};
+ ";