jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  Sbisson: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: Ie241744201380ca5450d5edbb3eba971194f3df4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to