* @return bool True if any option was reset
*/
private function fixContradictoryOptions( FormOptions $opts ) {
- $contradictorySets = [];
-
$fixed = $this->fixBackwardsCompatibilityOptions( $opts );
foreach ( $this->filterGroups as $filterGroup ) {
if ( $filterGroup instanceof ChangesListBooleanFilterGroup ) {
$filters = $filterGroup->getFilters();
+
+ if ( count( $filters ) === 1 ) {
+ // legacy boolean filters should not be considered
+ continue;
+ }
+
$allInGroupEnabled = array_reduce(
$filters,
function ( $carry, $filter ) use ( $opts ) {
if ( $allInGroupEnabled ) {
foreach ( $filters as $filter ) {
- $opts->reset( $filter->getName() );
+ $opts[ $filter->getName() ] = false;
}
$fixed = true;
// Namespace filtering
if ( $opts[ 'namespace' ] !== '' ) {
- $namespaces = explode( ',', $opts[ 'namespace' ] );
+ $namespaces = explode( ';', $opts[ 'namespace' ] );
if ( $opts[ 'associated' ] ) {
$associatedNamespaces = array_map(
$aboveNewcomer = $dbr->makeList(
[
'user_editcount >= ' . intval( $wgLearnerEdits ),
- 'user_registration <= ' . $dbr->timestamp( $learnerCutoff ),
+ 'user_registration <= ' . $dbr->addQuotes( $dbr->timestamp( $learnerCutoff ) ),
],
IDatabase::LIST_AND
);
$aboveLearner = $dbr->makeList(
[
'user_editcount >= ' . intval( $wgExperiencedUserEdits ),
- 'user_registration <= ' . $dbr->timestamp( $experiencedUserCutoff ),
+ 'user_registration <= ' .
+ $dbr->addQuotes( $dbr->timestamp( $experiencedUserCutoff ) ),
],
IDatabase::LIST_AND
);