87 $rcQuery = RecentChange::getQueryInfo();
92 $username = $this->opts->getValue(
'username' );
93 $user = Title::makeTitleSafe(
NS_USER, $username );
95 $size = abs( intval( $this->opts->getValue(
'size' ) ) );
97 if ( $this->opts->getValue(
'size-mode' ) ===
'max' ) {
98 $conds[] =
'page_len <= ' . $size;
100 $conds[] =
'page_len >= ' . $size;
105 $conds[
'actor_name'] = $user->getText();
106 } elseif ( $this->canAnonymousUsersCreatePages() && $this->opts->getValue(
'hideliu' ) ) {
107 # If anons cannot make new pages, don't "exclude logged in users"!
108 $conds[
'actor_user'] =
null;
111 $conds = array_merge( $conds, $this->getNamespaceCond() );
113 # If this user cannot see patrolled edits or they are off, don't do dumb queries!
114 if ( $this->opts->getValue(
'hidepatrolled' ) && $this->getUser()->useNPPatrol() ) {
115 $conds[
'rc_patrolled'] = RecentChange::PRC_UNPATROLLED;
118 if ( $this->opts->getValue(
'hidebots' ) ) {
119 $conds[
'rc_bot'] = 0;
122 if ( $this->opts->getValue(
'hideredirs' ) ) {
123 $conds[
'page_is_redirect'] = 0;
127 $tables = array_merge( $rcQuery[
'tables'], [
'page' ] );
128 $fields = array_merge( $rcQuery[
'fields'], [
129 'length' =>
'page_len',
'rev_id' =>
'page_latest',
'page_namespace',
'page_title',
130 'page_content_model',
132 $join_conds = [
'page' => [
'JOIN',
'page_id=rc_cur_id' ] ] + $rcQuery[
'joins'];
134 $this->hookRunner->onSpecialNewpagesConditions(
135 $this, $this->opts, $conds, $tables, $fields, $join_conds );
142 'join_conds' => $join_conds
152 $this->opts[
'tagfilter']