Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365878 )

Change subject: ChangesListStringOptionsFilter: Make isSelected() respect ALL
......................................................................

ChangesListStringOptionsFilter: Make isSelected() respect ALL

ChangesListStringOptionsGroup::modifyQuery checks for ALL and
behaves accordingly, but isSelected() didn't. This broke conflict
detection when an entire non-full-coverage group was selected.

Bug: T162630
Change-Id: Ie241744201380ca5450d5edbb3eba971194f3df4
---
M includes/changes/ChangesListStringOptionsFilter.php
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/365878/1

diff --git a/includes/changes/ChangesListStringOptionsFilter.php 
b/includes/changes/ChangesListStringOptionsFilter.php
index 6754d67..76d0bef 100644
--- a/includes/changes/ChangesListStringOptionsFilter.php
+++ b/includes/changes/ChangesListStringOptionsFilter.php
@@ -19,10 +19,12 @@
         * @inheritdoc
         */
        public function isSelected( FormOptions $opts ) {
-               $values = explode(
-                       ChangesListStringOptionsFilterGroup::SEPARATOR,
-                       $opts[ $this->getGroup()->getName() ]
-               );
+               $option = $opts[ $this->getGroup()->getName() ];
+               if ( $option === ChangesListStringOptionsFilterGroup::ALL ) {
+                       return true;
+               }
+
+               $values = explode( 
ChangesListStringOptionsFilterGroup::SEPARATOR, $option );
                return in_array( $this->getName(), $values );
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/365878
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie241744201380ca5450d5edbb3eba971194f3df4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to