Merge "Rewrite pref cleanup script"
[lhc/web/wiklou.git] / includes / changes / ChangesListStringOptionsFilter.php
index 1c977b9..930ba12 100644 (file)
@@ -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 );
+       }
 }