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

Change subject: Special:MobileOptions should only list features in beta but not 
stable
......................................................................

Special:MobileOptions should only list features in beta but not stable

Change-Id: Ic99fc2505748945b9e22527f40a7d2247aa7a1f4
---
M includes/features/Feature.php
M includes/specials/SpecialMobileOptions.php
2 files changed, 14 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/41/403841/1

diff --git a/includes/features/Feature.php b/includes/features/Feature.php
index b29cd13..17cb862 100644
--- a/includes/features/Feature.php
+++ b/includes/features/Feature.php
@@ -37,6 +37,13 @@
        /**
         * @inheritDoc
         */
+       public function __toString() {
+               return $this->name;
+       }
+
+       /**
+        * @inheritDoc
+        */
        public function isAvailable( $mode ) {
                return array_key_exists( $mode, $this->options ) ?
                        $this->options[ $mode ] : self::DEFAULT_ENABLED_MODE;
diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 80cf3df..ec55151 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -104,9 +104,13 @@
                                ]
                        );
 
-                       $features = \MediaWiki\MediaWikiServices::getInstance()
-                               ->getService( 'MobileFrontend.FeaturesManager' )
-                               ->getAvailable( MobileContext::MODE_BETA );
+                       $manager = \MediaWiki\MediaWikiServices::getInstance()
+                               ->getService( 'MobileFrontend.FeaturesManager' 
);
+
+                       $features = array_diff(
+                               $manager->getAvailable( 
MobileContext::MODE_BETA ),
+                               $manager->getAvailable( 'base' )
+                       );
 
                        $classNames = [ 'mobile-options-beta-feature' ];
                        if ( $isInBeta ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic99fc2505748945b9e22527f40a7d2247aa7a1f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: specialpages
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to