[
'maxDays' => (int)$this->getConfig()->get( 'RCMaxAge' ) / ( 24 * 3600 ), // Translate to days
'limitArray' => $this->getConfig()->get( 'RCLinkLimits' ),
+ 'limitDefault' => $this->getDefaultLimit(),
'daysArray' => $this->getConfig()->get( 'RCLinkDays' ),
+ 'daysDefault' => $this->getDefaultDays(),
]
);
}
$opts->add( 'invert', false );
$opts->add( 'associated', false );
$opts->add( 'urlversion', 1 );
+ $opts->add( 'tagfilter', '' );
return $opts;
}
&$join_conds, FormOptions $opts
) {
$dbr = $this->getDB();
+ $isStructuredUI = $this->isStructuredFilterUiEnabled();
foreach ( $this->filterGroups as $filterGroup ) {
// URL parameters can be per-group, like 'userExpLevel',
$query_options, $join_conds, $opts[$filterGroup->getName()] );
} else {
foreach ( $filterGroup->getFilters() as $filter ) {
- if ( $opts[$filter->getName()] ) {
+ if ( $filter->isActive( $opts, $isStructuredUI ) ) {
$filter->modifyQuery( $dbr, $this, $tables, $fields, $conds,
$query_options, $join_conds );
}
*
* @return bool
*/
- protected function isStructuredFilterUiEnabled() {
+ public function isStructuredFilterUiEnabled() {
return $this->getUser()->getOption( 'rcenhancedfilters' );
}
+
+ abstract function getDefaultLimit();
+
+ abstract function getDefaultDays();
}