}
public static function checkStructuredFilterUiEnabled( Config $config, User $user ) {
- if ( !$config->get( 'StructuredChangeFiltersOnWatchlist' ) ) {
- return false;
- }
-
- if ( $config->get( 'StructuredChangeFiltersShowWatchlistPreference' ) ) {
- return !$user->getOption( 'wlenhancedfilters-disable' );
- } else {
- return $user->getOption( 'rcenhancedfilters' );
- }
+ return !$user->getOption( 'wlenhancedfilters-disable' );
}
/**
'activeValue' => false,
'default' => $this->getUser()->getBoolOption( 'extendwatchlist' ),
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables,
- &$fields, &$conds, &$query_options, &$join_conds ) {
+ &$fields, &$conds, &$query_options, &$join_conds ) {
$nonRevisionTypes = [ RC_LOG ];
Hooks::run( 'SpecialWatchlistGetNonRevisionTypes', [ &$nonRevisionTypes ] );
if ( $nonRevisionTypes ) {
],
'default' => ChangesListStringOptionsFilterGroup::NONE,
'queryCallable' => function ( $specialPageClassName, $context, $dbr,
- &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedValues ) {
+ &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedValues ) {
if ( $selectedValues === [ 'seen' ] ) {
$conds[] = $dbr->makeList( [
'wl_notificationtimestamp IS NULL',
);
}
- protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options,
- &$join_conds, $opts
- ) {
- return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts )
- && Hooks::run(
- 'SpecialWatchlistQuery',
- [ &$conds, &$tables, &$join_conds, &$fields, $opts ],
- '1.23'
- );
- }
-
/**
* Return a IDatabase object for reading
*
[
'selected' => $opts['namespace'],
'all' => '',
- 'label' => $this->msg( 'namespace' )->text()
+ 'label' => $this->msg( 'namespace' )->text(),
+ 'in-user-lang' => true,
], [
'name' => 'namespace',
'id' => 'namespace',