X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fchanges%2FChangesListBooleanFilterGroup.php;h=4401378b28784b0c7b2587fbaf2487986ae9ffbc;hb=ef8179300a76f93c2ed51c051d99408e3403513b;hp=0622211f0ab46663658674f3b35d7e989f1dbf00;hpb=5256bb8ce2da1390f84ef535d990129eebd74fd2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/changes/ChangesListBooleanFilterGroup.php b/includes/changes/ChangesListBooleanFilterGroup.php index 0622211f0a..4401378b28 100644 --- a/includes/changes/ChangesListBooleanFilterGroup.php +++ b/includes/changes/ChangesListBooleanFilterGroup.php @@ -1,5 +1,7 @@ filters[$filter->getName()] = $filter; @@ -61,7 +63,27 @@ class ChangesListBooleanFilterGroup extends ChangesListFilterGroup { /** * @inheritDoc */ - public function isPerGroupRequestParameter() { - return false; + public function modifyQuery( IDatabase $dbr, ChangesListSpecialPage $specialPage, + &$tables, &$fields, &$conds, &$query_options, &$join_conds, + FormOptions $opts, $isStructuredFiltersEnabled + ) { + /** @var ChangesListBooleanFilter $filter */ + foreach ( $this->getFilters() as $filter ) { + if ( $filter->isActive( $opts, $isStructuredFiltersEnabled ) ) { + $filter->modifyQuery( $dbr, $specialPage, $tables, $fields, $conds, + $query_options, $join_conds ); + } + } + } + + /** + * @inheritDoc + */ + public function addOptions( FormOptions $opts, $allowDefaults, $isStructuredFiltersEnabled ) { + /** @var ChangesListBooleanFilter $filter */ + foreach ( $this->getFilters() as $filter ) { + $defaultValue = $allowDefaults ? $filter->getDefault( $isStructuredFiltersEnabled ) : false; + $opts->add( $filter->getName(), $defaultValue ); + } } }