+ // legacy 'extended' filter
+ $this->registerFilterGroup( new ChangesListBooleanFilterGroup( [
+ 'name' => 'extended-group',
+ 'filters' => [
+ [
+ 'name' => 'extended',
+ 'isReplacedInStructuredUi' => true,
+ 'isVisible' => false,
+ 'activeValue' => false,
+ 'default' => $this->getUser()->getBoolOption( 'extendwatchlist' ),
+ 'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables,
+ &$fields, &$conds, &$query_options, &$join_conds ) {
+ $nonRevisionTypes = [ RC_LOG ];
+ Hooks::run( 'SpecialWatchlistGetNonRevisionTypes', [ &$nonRevisionTypes ] );
+ if ( $nonRevisionTypes ) {
+ $conds[] = $dbr->makeList(
+ [
+ 'rc_this_oldid=page_latest',
+ 'rc_type' => $nonRevisionTypes,
+ ],
+ LIST_OR
+ );
+ }
+ },
+ ]
+ ],
+
+ ] ) );
+
+ if ( $this->isStructuredFilterUiEnabled() ) {
+ $this->getFilterGroup( 'lastRevision' )
+ ->getFilter( 'hidepreviousrevisions' )
+ ->setDefault( !$this->getUser()->getBoolOption( 'extendwatchlist' ) );
+ }
+