X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fchanges%2FChangesListStringOptionsFilter.php;h=930ba128f64ab44c11bb4c9dc195620c29011e74;hp=1c977b9d4ef6dd66421940df6e2d00da32f8b9e1;hb=7babd362babcbf7f20adb8e12edb4f4bc1d4249f;hpb=8ea7953ab57163a575a2ce02d5dbf862d7c9744a diff --git a/includes/changes/ChangesListStringOptionsFilter.php b/includes/changes/ChangesListStringOptionsFilter.php index 1c977b9d4e..930ba128f6 100644 --- a/includes/changes/ChangesListStringOptionsFilter.php +++ b/includes/changes/ChangesListStringOptionsFilter.php @@ -9,9 +9,22 @@ */ class ChangesListStringOptionsFilter extends ChangesListFilter { /** - * @inheritdoc + * @inheritDoc */ public function displaysOnUnstructuredUi() { return false; } + + /** + * @inheritDoc + */ + public function isSelected( FormOptions $opts ) { + $option = $opts[ $this->getGroup()->getName() ]; + if ( $option === ChangesListStringOptionsFilterGroup::ALL ) { + return true; + } + + $values = explode( ChangesListStringOptionsFilterGroup::SEPARATOR, $option ); + return in_array( $this->getName(), $values ); + } }