Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/267519

Change subject: Allow to link to Special:Preferences/betafeatures in 
MobileFrontend
......................................................................

Allow to link to Special:Preferences/betafeatures in MobileFrontend

There shouldn't be a link to the betafeatures section on the main entry point
of Special:Preferences, but for Idbaae9fe2decd89b73e623a25fbd39464c316fb2 it
should be possible to link to it.

Change-Id: I6d8c5b80e70c3d8d1a92a70cc91e1b90d598cb0f
---
M includes/specials/SpecialMobilePreferences.php
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/includes/specials/SpecialMobilePreferences.php 
b/includes/specials/SpecialMobilePreferences.php
index 7dfb277..1f81d53 100644
--- a/includes/specials/SpecialMobilePreferences.php
+++ b/includes/specials/SpecialMobilePreferences.php
@@ -10,6 +10,11 @@
                'skin',
                'files',
                'rc',
+               'betafeatures',
+       );
+
+       protected $hiddenTabs = array(
+               'betafeatures',
        );
 
        /**
@@ -35,6 +40,9 @@
                                break;
                        case 'rc':
                                Preferences::rcPreferences( $user, $ctx, $prefs 
);
+                               break;
+                       case 'betafeatures':
+                               BetaFeaturesHooks::getPreferences( $user, 
$prefs );
                                break;
                }
 
@@ -67,6 +75,11 @@
                        $htmlForm->show();
                } else {
                        foreach ( $this->validTabs as $tabName ) {
+                               // hidden tabs allow a user to navigate to the 
section of the preferences page,
+                               // but shouldn't be visible on the main entry 
point (Special:Preferences)
+                               if ( in_array( $tabName, $this->hiddenTabs ) ) {
+                                       continue;
+                               }
                                $attrs = array(
                                        'class' => $baseClass = 
MobileUI::buttonClass( 'block' ),
                                        'href' => SpecialPage::getTitleFor( 
$this->getName(), $tabName )->getLocalUrl(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d8c5b80e70c3d8d1a92a70cc91e1b90d598cb0f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to