},
'cssClassSuffix' => 'patrolled',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
- return $rc->getAttribute( 'rc_patrolled' );
+ return $rc->getAttribute( 'rc_patrolled' );
},
],
[
},
'cssClassSuffix' => 'unpatrolled',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
- return !$rc->getAttribute( 'rc_patrolled' );
+ return !$rc->getAttribute( 'rc_patrolled' );
},
],
],
public function getDefaultOptions() {
$config = $this->getConfig();
$opts = new FormOptions();
+ $structuredUI = $this->getUser()->getOption( 'rcenhancedfilters' );
// Add all filters
foreach ( $this->filterGroups as $filterGroup ) {
$opts->add( $filterGroup->getName(), $filterGroup->getDefault() );
} else {
foreach ( $filterGroup->getFilters() as $filter ) {
- $opts->add( $filter->getName(), $filter->getDefault() );
+ $opts->add( $filter->getName(), $filter->getDefault( $structuredUI ) );
}
}
}
&$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedExpLevels ) {
global $wgLearnerEdits,
- $wgExperiencedUserEdits,
- $wgLearnerMemberSince,
- $wgExperiencedUserMemberSince;
+ $wgExperiencedUserEdits,
+ $wgLearnerMemberSince,
+ $wgExperiencedUserMemberSince;
$LEVEL_COUNT = 3;
);
if ( $selectedExpLevels === [ 'newcomer' ] ) {
- $conds[] = "NOT ( $aboveNewcomer )";
+ $conds[] = "NOT ( $aboveNewcomer )";
} elseif ( $selectedExpLevels === [ 'learner' ] ) {
$conds[] = $dbr->makeList(
[ $aboveNewcomer, "NOT ( $aboveLearner )" ],