public function __construct( $name, $restriction ) {
parent::__construct( $name, $restriction );
+ $nonRevisionTypes = [ RC_LOG ];
+ Hooks::run( 'SpecialWatchlistGetNonRevisionTypes', [ &$nonRevisionTypes ] );
+
$this->filterGroupDefinitions = [
[
'name' => 'registration',
'description' => 'rcfilters-filter-lastrevision-description',
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
- &$query_options, &$join_conds ) {
- $conds[] = 'rc_this_oldid <> page_latest';
+ &$query_options, &$join_conds ) use ( $nonRevisionTypes ) {
+ $conds[] = $dbr->makeList(
+ [
+ 'rc_this_oldid <> page_latest',
+ 'rc_type' => $nonRevisionTypes,
+ ],
+ LIST_OR
+ );
},
'cssClassSuffix' => 'last',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
'description' => 'rcfilters-filter-previousrevision-description',
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
- &$query_options, &$join_conds ) {
- $conds[] = 'rc_this_oldid = page_latest';
+ &$query_options, &$join_conds ) use ( $nonRevisionTypes ) {
+ $conds[] = $dbr->makeList(
+ [
+ 'rc_this_oldid = page_latest',
+ 'rc_type' => $nonRevisionTypes,
+ ],
+ LIST_OR
+ );
},
'cssClassSuffix' => 'previous',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
)
);
- $experimentalStructuredChangeFilters =
- $this->getConfig()->get( 'StructuredChangeFiltersEnableExperimentalViews' );
-
$out->addJsConfigVars( 'wgStructuredChangeFilters', $jsData['groups'] );
- $out->addJsConfigVars(
- 'wgStructuredChangeFiltersEnableExperimentalViews',
- $experimentalStructuredChangeFilters
- );
$out->addJsConfigVars(
'wgRCFiltersChangeTags',
]
);
+ $out->addJsConfigVars(
+ 'StructuredChangeFiltersLiveUpdatePollingRate',
+ $this->getConfig()->get( 'StructuredChangeFiltersLiveUpdatePollingRate' )
+ );
+
if ( static::$savedQueriesPreferenceName ) {
$savedQueries = FormatJson::decode(
$this->getUser()->getOption( static::$savedQueriesPreferenceName )