36 parent::__construct( $form->getContext() );
42 $rcQuery = RecentChange::getQueryInfo();
47 $namespace = $this->opts->getValue(
'namespace' );
48 $namespace = ( $namespace ===
'all' ) ?
false : intval( $namespace );
50 $username = $this->opts->getValue(
'username' );
51 $user = Title::makeTitleSafe( NS_USER,
$username );
53 $size = abs( intval( $this->opts->getValue(
'size' ) ) );
55 if ( $this->opts->getValue(
'size-mode' ) ===
'max' ) {
56 $conds[] =
'page_len <= ' . $size;
58 $conds[] =
'page_len >= ' . $size;
64 if ( $namespace !==
false ) {
65 if ( $this->opts->getValue(
'invert' ) ) {
66 $conds[] =
'rc_namespace != ' . $this->mDb->addQuotes( $namespace );
68 $conds[
'rc_namespace'] = $namespace;
73 $conds[] = ActorMigration::newMigration()->getWhere(
77 $this->opts->getValue(
'hideliu' )
79 # If anons cannot make new pages, don't "exclude logged in users"!
80 $conds[] = ActorMigration::newMigration()->isAnon( $rcQuery[
'fields'][
'rc_user'] );
83 # If this user cannot see patrolled edits or they are off, don't do dumb queries!
84 if ( $this->opts->getValue(
'hidepatrolled' ) && $this->getUser()->useNPPatrol() ) {
85 $conds[
'rc_patrolled'] = RecentChange::PRC_UNPATROLLED;
88 if ( $this->opts->getValue(
'hidebots' ) ) {
92 if ( $this->opts->getValue(
'hideredirs' ) ) {
93 $conds[
'page_is_redirect'] = 0;
97 $tables = array_merge( $rcQuery[
'tables'], [
'page' ] );
98 $fields = array_merge( $rcQuery[
'fields'], [
99 'length' =>
'page_len',
'rev_id' =>
'page_latest',
'page_namespace',
'page_title'
101 $join_conds = [
'page' => [
'INNER JOIN',
'page_id=rc_cur_id' ] ] + $rcQuery[
'joins'];
105 Hooks::run(
'SpecialNewpagesConditions',
106 [ &$pager, $this->opts, &$conds, &
$tables, &$fields, &$join_conds ] );
111 $options = [
'USE INDEX' => [
'recentchanges' => $rcIndexes ] ];
119 'join_conds' => $join_conds
129 $this->opts[
'tagfilter']
136 return 'rc_timestamp';
140 return $this->mForm->formatRow( $row );
144 # Do a batch existence check on pages
146 foreach ( $this->mResult as $row ) {
147 $linkBatch->add( NS_USER, $row->rc_user_text );
149 $linkBatch->add( $row->page_namespace, $row->page_title );
151 $linkBatch->execute();
Class representing a list of titles The execute() method checks them all for existence and adds them ...
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static groupHasPermission( $group, $role)
Check, if the given group has the given permission.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
this hook is for auditing only or null if authentication failed before getting that far $username