44 parent::__construct( $form->getContext() );
55 $username = $this->opts->getValue(
'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;
72 # If anons cannot make new pages, don't "exclude logged in users"!
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() ) {
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'
96 $join_conds = [
'page' => [
'JOIN',
'page_id=rc_cur_id' ] ] + $rcQuery[
'joins'];
101 [ &$pager, $this->opts, &$conds, &$tables, &$fields, &$join_conds ] );
108 'join_conds' => $join_conds
118 $this->opts[
'tagfilter']
125 $pm = MediaWikiServices::getInstance()->getPermissionManager();
126 return ( $pm->groupHasPermission(
'*',
'createpage' ) ||
127 $pm->groupHasPermission(
'*',
'createtalk' )
133 $namespace = $this->opts->getValue(
'namespace' );
134 if ( $namespace ===
'all' || $namespace ===
'' ) {
138 $namespace = intval( $namespace );
139 $invert = $this->opts->getValue(
'invert' );
140 $associated = $this->opts->getValue(
'associated' );
142 $eq_op = $invert ?
'!=' :
'=';
143 $bool_op = $invert ?
'AND' :
'OR';
145 $selectedNS = $this->mDb->addQuotes( $namespace );
146 if ( !$associated ) {
147 return [
"rc_namespace $eq_op $selectedNS" ];
150 $associatedNS = $this->mDb->addQuotes(
151 MediaWikiServices::getInstance()->getNamespaceInfo()->getAssociated( $namespace )
154 "rc_namespace $eq_op $selectedNS " .
156 " rc_namespace $eq_op $associatedNS"
161 return 'rc_timestamp';
165 return $this->mForm->formatRow( $row );
169 # Do a batch existence check on pages
171 foreach ( $this->mResult as $row ) {
172 $linkBatch->add(
NS_USER, $row->rc_user_text );
174 $linkBatch->add( $row->page_namespace, $row->page_title );
176 $linkBatch->execute();