);
}
- public function isStructuredFilterUiEnabledByDefault() {
- return $this->getConfig()->get( 'StructuredChangeFiltersOnWatchlist' ) &&
- $this->getUser()->getDefaultOption( 'rcenhancedfilters' );
- }
-
/**
* Return an array of subpages that this special page will accept.
*
$reviewStatus = $this->getFilterGroup( 'reviewStatus' );
if ( $reviewStatus !== null ) {
// Conditional on feature being available and rights
- $hidePatrolled = $reviewStatus->getFilter( 'hidepatrolled' );
- $hidePatrolled->setDefault( $user->getBoolOption( 'watchlisthidepatrolled' ) );
+ if ( $user->getBoolOption( 'watchlisthidepatrolled' ) ) {
+ $reviewStatus->setDefault( 'unpatrolled' );
+ $legacyReviewStatus = $this->getFilterGroup( 'legacyReviewStatus' );
+ $legacyHidePatrolled = $legacyReviewStatus->getFilter( 'hidepatrolled' );
+ $legacyHidePatrolled->setDefault( true );
+ }
}
$authorship = $this->getFilterGroup( 'authorship' );
$output = $this->getOutput();
# Show a message about replica DB lag, if applicable
- $lag = wfGetLB()->safeGetLag( $dbr );
+ $lag = MediaWikiServices::getInstance()->getDBLoadBalancer()->safeGetLag( $dbr );
if ( $lag > 0 ) {
$output->showLagWarning( $lag );
}
return Html::rawElement(
'span',
$attribs,
- Xml::checkLabel(
- $this->msg( $message, '' )->text(),
- $name,
- $name,
- (int)$value
+ // not using Html::checkLabel because that would escape the contents
+ Html::check( $name, (int)$value, [ 'id' => $name ] ) . Html::rawElement(
+ 'label',
+ $attribs + [ 'for' => $name ],
+ // <nowiki/> at beginning to avoid messages with "$1 ..." being parsed as pre tags
+ $this->msg( $message, '<nowiki/>' )->parse()
)
);
}