+ $options = array (
+ 'LIMIT' => $limit +1,
+ 'ORDER BY' => 'rc_timestamp' . ($dirNewer ? '' : ' DESC'),
+ 'USE INDEX' => 'rc_timestamp');
+
+ if (is_null($resultPageSet)) {
+ $fields = array (
+ 'rc_namespace AS page_namespace',
+ 'rc_title AS page_title',
+ 'rc_comment AS rev_comment',
+ 'rc_cur_id AS page_id',
+ 'rc_user AS rev_user',
+ 'rc_user_text AS rev_user_text',
+ 'rc_timestamp AS rev_timestamp',
+ 'rc_minor AS rev_minor_edit',
+ 'rc_this_oldid AS rev_id',
+ 'rc_last_oldid',
+ 'rc_id',
+ // 'rc_patrolled',
+ 'rc_new AS page_is_new'
+ );
+ } elseif ($allrev) {
+ $fields = array (
+ 'rc_this_oldid AS rev_id',
+ 'rc_namespace AS page_namespace',
+ 'rc_title AS page_title',
+ 'rc_timestamp AS rev_timestamp'
+ );
+ } else {
+ $fields = array (
+ 'rc_cur_id AS page_id',
+ 'rc_namespace AS page_namespace',
+ 'rc_title AS page_title',
+ 'rc_timestamp AS rev_timestamp'
+ );
+ }