50 $rcQuery = RecentChange::getQueryInfo();
55 $username = $this->opts->getValue(
'username' );
56 $user = Title::makeTitleSafe(
NS_USER, $username );
58 $size = abs( intval( $this->opts->getValue(
'size' ) ) );
60 if ( $this->opts->getValue(
'size-mode' ) ===
'max' ) {
61 $conds[] =
'page_len <= ' . $size;
63 $conds[] =
'page_len >= ' . $size;
68 $conds[] = ActorMigration::newMigration()->getWhere(
69 $this->mDb,
'rc_user', User::newFromName( $user->getText(),
false ),
false
72 # If anons cannot make new pages, don't "exclude logged in users"!
73 $conds[] = ActorMigration::newMigration()->isAnon( $rcQuery[
'fields'][
'rc_user'] );
78 # If this user cannot see patrolled edits or they are off, don't do dumb queries!
79 if ( $this->opts->getValue(
'hidepatrolled' ) && $this->getUser()->useNPPatrol() ) {
80 $conds[
'rc_patrolled'] = RecentChange::PRC_UNPATROLLED;
83 if ( $this->opts->getValue(
'hidebots' ) ) {
87 if ( $this->opts->getValue(
'hideredirs' ) ) {
88 $conds[
'page_is_redirect'] = 0;
92 $tables = array_merge( $rcQuery[
'tables'], [
'page' ] );
93 $fields = array_merge( $rcQuery[
'fields'], [
94 'length' =>
'page_len',
'rev_id' =>
'page_latest',
'page_namespace',
'page_title',
97 $join_conds = [
'page' => [
'JOIN',
'page_id=rc_cur_id' ] ] + $rcQuery[
'joins'];
99 $this->getHookRunner()->onSpecialNewpagesConditions(
100 $this, $this->opts, $conds, $tables, $fields, $join_conds );
107 'join_conds' => $join_conds
117 $this->opts[
'tagfilter']
132 $namespace = $this->opts->getValue(
'namespace' );
133 if ( $namespace ===
'all' || $namespace ===
'' ) {
137 $namespace = intval( $namespace );
143 $invert = $this->opts->getValue(
'invert' );
144 $associated = $this->opts->getValue(
'associated' );
146 $eq_op = $invert ?
'!=' :
'=';
147 $bool_op = $invert ?
'AND' :
'OR';
149 $selectedNS = $this->mDb->addQuotes( $namespace );
150 if ( !$associated ) {
151 return [
"rc_namespace $eq_op $selectedNS" ];
154 $associatedNS = $this->mDb->addQuotes(
155 MediaWikiServices::getInstance()->getNamespaceInfo()->getAssociated( $namespace )
158 "rc_namespace $eq_op $selectedNS " .
160 " rc_namespace $eq_op $associatedNS"