}
}
- protected function isStructuredFilterUiEnabled() {
- return parent::isStructuredFilterUiEnabled()
- && ( $this->getConfig()->get( 'StructuredChangeFiltersOnWatchlist' )
- || $this->getRequest()->getBool( 'rcfilters' ) );
+ public function isStructuredFilterUiEnabled() {
+ return $this->getRequest()->getBool( 'rcfilters' ) || (
+ $this->getConfig()->get( 'StructuredChangeFiltersOnWatchlist' ) &&
+ $this->getUser()->getOption( 'rcenhancedfilters' )
+ );
+ }
+
+ public function isStructuredFilterUiEnabledByDefault() {
+ return $this->getConfig()->get( 'StructuredChangeFiltersOnWatchlist' ) &&
+ $this->getUser()->getDefaultOption( 'rcenhancedfilters' );
}
/**
*/
public function getDefaultOptions() {
$opts = parent::getDefaultOptions();
- $user = $this->getUser();
- $opts->add( 'days', $user->getOption( 'watchlistdays' ), FormOptions::FLOAT );
- $opts->add( 'limit', $user->getIntOption( 'wllimit' ), FormOptions::INT );
+ $opts->add( 'days', $this->getDefaultDays(), FormOptions::FLOAT );
+ $opts->add( 'limit', $this->getDefaultLimit(), FormOptions::INT );
return $opts;
}
}
function getDefaultDays() {
- return $this->getUser()->getIntOption( 'watchlistdays' );
+ return floatval( $this->getUser()->getOption( 'watchlistdays' ) );
}
}